defaults = array( 'title' => 'Author Details', 'alignment' => 'left', 'user' => '', 'size' => '45', 'author_info' => 'bio', 'text-bio' => '', 'page' => '', 'page_link_text' => __( 'Read More', 'awp' ) . '…', 'posts_link' => '0', 'sort_radiobox' => '0', ); $widget_ops = array( 'classname' => __('awp_author_bio awp_widget', 'awp'), 'description' => __( 'Displays user profile block with Gravatar', 'awp' ), ); $control_ops = array( 'id_base' => 'author_bio', 'width' => 200, 'height' => 250, ); parent::__construct( 'author_bio', __( 'AWP Author Details', 'awp' ), $widget_ops, $control_ops ); } function widget($args, $instance) { extract ($args); $instance = wp_parse_args((array) $instance, $this->defaults); echo $before_widget; echo "
'; echo $after_widget; } function form($instance) { $instance = wp_parse_args( (array) $instance, $this->defaults ); ?>
'authors', 'name' => $this->get_field_name( 'user' ), 'selected' => $instance['user'] ) ); ?>
value="bio">
value="text">
$this->get_field_name( 'page' ), 'show_option_none' => __( 'None', 'awp' ), 'selected' => $instance['page'] ) ); ?>
id="get_field_id('posts_link'); ?>" name="get_field_name('posts_link'); ?>" />