Ticket #34026: 34026.2.patch
File 34026.2.patch, 2.7 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-tag-cloud.php
16 16 */ 17 17 class WP_Widget_Tag_Cloud extends WP_Widget { 18 18 19 /** 20 * Creates a new Tag cloud widget instance. 21 * 22 * @since 2.8.0 23 * @access public 24 */ 19 25 public function __construct() { 20 26 $widget_ops = array( 'description' => __( "A cloud of your most used tags.") ); 21 27 parent::__construct('tag_cloud', __('Tag Cloud'), $widget_ops); … … 22 28 } 23 29 24 30 /** 25 * @param array $args 26 * @param array $instance 31 * Echoes the current Tag cloud widget instance content. 32 * 33 * @since 2.8.0 34 * @access public 35 * 36 * @param array $args Display arguments including 'before_title', 'after_title', 37 * 'before_widget', and 'after_widget'. 38 * @param array $instance The settings for the particular instance of the widget. 27 39 */ 28 40 public function widget( $args, $instance ) { 29 41 $current_taxonomy = $this->_get_current_taxonomy($instance); … … 74 86 } 75 87 76 88 /** 77 * @param array $new_instance 78 * @param array $old_instance 79 * @return array 89 * Handles updating settings for the current Tag cloud widget instance. 90 * 91 * This function should check that `$new_instance` is set correctly. The newly-calculated 92 * value of `$instance` should be returned. If false is returned, the instance won't be 93 * saved/updated. 94 * 95 * @since 2.8.0 96 * @access public 97 * 98 * @param array $new_instance New settings for this instance as input by the user via 99 * WP_Widget::form(). 100 * @param array $old_instance Old settings for this instance. 101 * @return array Settings to save or bool false to cancel saving. 80 102 */ 81 103 public function update( $new_instance, $old_instance ) { 82 104 $instance = array(); … … 86 108 } 87 109 88 110 /** 89 * @param array $instance 111 * Outputs the current Tag cloud widget instance settings update form. 112 * 113 * @since 2.8.0 114 * @access public 115 * 116 * @param array $instance Current settings. 90 117 */ 91 118 public function form( $instance ) { 92 119 $current_taxonomy = $this->_get_current_taxonomy($instance); … … 141 168 } 142 169 143 170 /** 144 * @param array $instance 145 * @return string 171 * Retrieves the taxonomy for the current Tag cloud widget instance. 172 * 173 * @since 4.4.0 174 * @access public 175 * 176 * @param array $instance Current settings. 177 * @return string Name of the current taxonomy if set, otherwise 'post_tag'. 146 178 */ 147 179 public function _get_current_taxonomy($instance) { 148 180 if ( !empty($instance['taxonomy']) && taxonomy_exists($instance['taxonomy']) )