From b8264d11bcbbefaa3d5edb6981c252a636f7c495 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 27 Sep 2015 01:03:31 +0000 Subject: [PATCH] Docs: Improve documentation for the `__construct()`, `widget()`, `update()`, `form()`, and `_get_current_taxonomy()` methods in `WP_Widget_Categories`. Props leemon. Fixes #34018. See #34013. git-svn-id: https://develop.svn.wordpress.org/trunk@34618 602fd350-edb4-49c9-b593-d223f7449a82 --- .../widgets/class-wp-widget-categories.php | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/src/wp-includes/widgets/class-wp-widget-categories.php b/src/wp-includes/widgets/class-wp-widget-categories.php index fcb74a6818..876aa0688f 100644 --- a/src/wp-includes/widgets/class-wp-widget-categories.php +++ b/src/wp-includes/widgets/class-wp-widget-categories.php @@ -17,16 +17,26 @@ */ class WP_Widget_Categories extends WP_Widget { + /** + * Sets up a new Categories widget instance. + * + * @since 2.8.0 + * @access public + */ public function __construct() { $widget_ops = array( 'classname' => 'widget_categories', 'description' => __( "A list or dropdown of categories." ) ); parent::__construct('categories', __('Categories'), $widget_ops); } /** - * @staticvar bool $first_dropdown + * Outputs the content for the current Categories widget instance. * - * @param array $args - * @param array $instance + * @since 2.8.0 + * @access public + * + * @param array $args Display arguments including 'before_title', 'after_title', + * 'before_widget', and 'after_widget'. + * @param array $instance Settings for the current Categories widget instance. */ public function widget( $args, $instance ) { static $first_dropdown = true; @@ -73,7 +83,7 @@ class WP_Widget_Categories extends WP_Widget { * @param array $cat_args An array of Categories widget drop-down arguments. */ wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) ); -?> + ?>