'about', 'description' => 'Display your gravatar and a short bio blurb.' ); /* Widget control settings. */ $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'about' ); /* Create the widget. */ $this->WP_Widget( 'about', 'About (by @ThemeJam)', $widget_ops, $control_ops ); } function widget( $args, $instance ) { extract( $args ); /* User-selected settings. */ $title = apply_filters('widget_title', $instance['title'] ); $imageurl = $instance['imageurl']; $biotext = $instance['biotext']; $morelinkurl = isset($instance['morelinkurl']) ? $instance['morelinkurl'] : ''; /* Before widget (defined by theme). */ echo $before_widget; /* Title of widget (before and after defined by theme). */ if ( $title ) echo $before_title . $title . $after_title; echo '

'; /* Display image */ if ( $imageurl ) echo ''. $title . ''; /* Display text */ if ( $biotext ) echo $biotext; echo '

'; /* Display Learn More link */ if ( $morelinkurl ) echo ''; /* After widget (defined by theme). */ echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; /* Strip tags (if needed) and update the widget settings. */ $instance['title'] = strip_tags( $new_instance['title'] ); $instance['imageurl'] = strip_tags( $new_instance['imageurl'] ); $instance['biotext'] = $new_instance['biotext']; $instance['morelinkurl'] = $new_instance['morelinkurl']; return $instance; } function form( $instance ) { /* Set up some default widget settings. */ $defaults = array( 'title' => 'Example', 'imageurl' => '', 'biotext' => '', 'show_sex' => true ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>