From c1796c55c3a29788d9eb13cb4fd326779cc8b7aa Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 27 Sep 2015 01:11:25 +0000 Subject: [PATCH] Docs: Improve documentation for the `__construct()`, `widget()`, `update()`, and `form()` methods in `WP_Widget_Archives`. Props leemon. Fixes #34016. See #34013. Built from https://develop.svn.wordpress.org/trunk@34620 git-svn-id: http://core.svn.wordpress.org/trunk@34584 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- .../widgets/class-wp-widget-archives.php | 51 +++++++++++++------ 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 04bca78062..cc97e865ad 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34619'; +$wp_version = '4.4-alpha-34620'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-archives.php b/wp-includes/widgets/class-wp-widget-archives.php index 9d0f3ac8ef..30e4ee0db2 100644 --- a/wp-includes/widgets/class-wp-widget-archives.php +++ b/wp-includes/widgets/class-wp-widget-archives.php @@ -16,14 +16,26 @@ */ class WP_Widget_Archives extends WP_Widget { + /** + * Sets up a new Archives widget instance. + * + * @since 2.8.0 + * @access public + */ public function __construct() { $widget_ops = array('classname' => 'widget_archive', 'description' => __( 'A monthly archive of your site’s Posts.') ); parent::__construct('archives', __('Archives'), $widget_ops); } /** - * @param array $args - * @param array $instance + * Outputs the content for the current Archives widget 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 Archives widget instance. */ public function widget( $args, $instance ) { $c = ! empty( $instance['count'] ) ? '1' : '0'; @@ -39,7 +51,7 @@ class WP_Widget_Archives extends WP_Widget { if ( $d ) { $dropdown_id = "{$this->id_base}-dropdown-{$this->number}"; -?> + ?> - + - '', 'count' => 0, 'dropdown' => '') ); $title = sanitize_text_field( $instance['title'] ); -?> + ?>

id="get_field_id('dropdown'); ?>" name="get_field_name('dropdown'); ?>" />
id="get_field_id('count'); ?>" name="get_field_name('count'); ?>" />

-