Ticket #34018: 34018.patch
File 34018.patch, 2.2 KB (added by , 10 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-categories.php
17 17 */ 18 18 class WP_Widget_Categories extends WP_Widget { 19 19 20 /** 21 * PHP5 constructor. 22 * 23 * @since 2.8.0 24 * @access public 25 */ 20 26 public function __construct() { 21 27 $widget_ops = array( 'classname' => 'widget_categories', 'description' => __( "A list or dropdown of categories." ) ); 22 28 parent::__construct('categories', __('Categories'), $widget_ops); … … 23 29 } 24 30 25 31 /** 26 * @staticvar bool $first_dropdown32 * Echoes the widget content. 27 33 * 28 * @param array $args 29 * @param array $instance 34 * @since 2.8.0 35 * @access public 36 * 37 * @param array $args Display arguments including 'before_title', 'after_title', 38 * 'before_widget', and 'after_widget'. 39 * @param array $instance The settings for the particular instance of the widget. 30 40 */ 31 41 public function widget( $args, $instance ) { 32 42 static $first_dropdown = true; … … 113 123 } 114 124 115 125 /** 116 * @param array $new_instance 117 * @param array $old_instance 118 * @return array 126 * Updates a particular instance of a widget. 127 * 128 * This function should check that `$new_instance` is set correctly. The newly-calculated 129 * value of `$instance` should be returned. If false is returned, the instance won't be 130 * saved/updated. 131 * 132 * @since 2.8.0 133 * @access public 134 * 135 * @param array $new_instance New settings for this instance as input by the user via 136 * WP_Widget::form(). 137 * @param array $old_instance Old settings for this instance. 138 * @return array Settings to save or bool false to cancel saving. 119 139 */ 120 140 public function update( $new_instance, $old_instance ) { 121 141 $instance = $old_instance; … … 129 149 } 130 150 131 151 /** 132 * @param array $instance 152 * Outputs the settings update form. 153 * 154 * @since 2.8.0 155 * @access public 156 * 157 * @param array $instance Current settings. 133 158 */ 134 159 public function form( $instance ) { 135 160 //Defaults