C2C_Widget_005( 'author-images', __FILE__, array() ); } /** * Initializes the plugin's configuration and localizable text variables. * * @return void */ function load_config() { $this->title = __( 'Author Image(s)', $this->textdomain ); $this->description = __( 'Display image (if present) and/or name for all authors on the blog.', $this->textdomain ); $this->config = array( // 'optioncount' => false, 'exclude_admin' => true, // 'show_fullname' => false, 'hide_empty' => true, // 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, // 'style' => 'list', 'html' => true, // 'show_name' => false, 'show_name_if_no_image' => false 'title' => array( 'input' => 'text', 'default' => __( 'Authors', $this->textdomain ), 'label' => __( 'Title', $this->textdomain ) ), 'exclude_admin' => array( 'input' => 'checkbox', 'default' => false, 'label' => __( 'Exclude admin?', $this->textdomain ), 'help' => __( 'Prevent admin accounts from being listed?', $this->textdomain ) ), 'hide_empty' => array( 'input' => 'checkbox', 'default' => false, 'label' => __( 'Ignore authors who have\'t published a post?', $this->textdomain ), 'help' => __( 'Omits showing image for authors who have not published a post.', $this->textdomain ) ), 'show_name' => array( 'input' => 'checkbox', 'default' => false, 'label' => __( 'Show user\'s name?', $this->textdomain ), 'help' => __( 'Also show the user\'s full name?', $this->textdomain ) ), 'show_name_if_no_image' => array( 'input' => 'checkbox', 'default' => false, 'label' => __( 'Show user\'s name if no image is found?', $this->textdomain ), 'help' => __( 'Should the author\'s name be shown if the author doesn\'t have an image? If not checked, then authors without an image are omitted from the listing.', $this->textdomain ) ), 'use_gravatar' => array( 'input' => 'checkbox', 'default' => true, 'label' => __( 'Use Gravatar?', $this->textdomain ), 'help' => __( 'Ask Gravatar for author image if no local image is found?', $this->textdomain ) ), ); } /** * Outputs the body of the widget * * @param array $args Widget args * @param array $instance Widget instance * @param array $settings Widget settings * @return void (Text is echoed.) */ function widget_body( $args, $instance, $settings ) { extract( $args ); extract( $settings ); echo ''; } /** * Validates widget instance values * * @param array $instance Array of widget instance values * @return array The filtered array of widget instance values */ function validate( $instance ) { // $instance['field'] = trim( $instance['field'] ); return $instance; } } // end class add_action( 'widgets_init', create_function('', 'register_widget(\'c2c_AuthorImagesWidget\');') ); endif; ?>