- Timestamp:
- 09/27/2015 01:03:31 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-categories.php
r34431 r34618 18 18 class WP_Widget_Categories extends WP_Widget { 19 19 20 /** 21 * Sets up a new Categories widget instance. 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." ) ); … … 24 30 25 31 /** 26 * @staticvar bool $first_dropdown 27 * 28 * @param array $args 29 * @param array $instance 32 * Outputs the content for the current Categories widget instance. 33 * 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 Settings for the current Categories widget instance. 30 40 */ 31 41 public function widget( $args, $instance ) { … … 74 84 */ 75 85 wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) ); 76 ?>86 ?> 77 87 78 88 <script type='text/javascript'> … … 114 124 115 125 /** 116 * @param array $new_instance 117 * @param array $old_instance 118 * @return array 126 * Handles updating settings for the current Categories widget instance. 127 * 128 * @since 2.8.0 129 * @access public 130 * 131 * @param array $new_instance New settings for this instance as input by the user via 132 * WP_Widget::form(). 133 * @param array $old_instance Old settings for this instance. 134 * @return array Updated settings to save. 119 135 */ 120 136 public function update( $new_instance, $old_instance ) { … … 130 146 131 147 /** 132 * @param array $instance 148 * Outputs the settings form for the Categories widget. 149 * 150 * @since 2.8.0 151 * @access public 152 * 153 * @param array $instance Current settings. 133 154 */ 134 155 public function form( $instance ) { … … 140 161 $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; 141 162 $current_taxonomy = $this->_get_current_taxonomy( $instance ); 142 ?>163 ?> 143 164 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:' ); ?></label> 144 165 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p> … … 166 187 <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hierarchical'); ?>" name="<?php echo $this->get_field_name('hierarchical'); ?>"<?php checked( $hierarchical ); ?> /> 167 188 <label for="<?php echo $this->get_field_id('hierarchical'); ?>"><?php _e( 'Show hierarchy' ); ?></label></p> 168 <?php169 } 170 171 /** 172 * Retrieves the taxonomy for the current widget instance.189 <?php 190 } 191 192 /** 193 * Retrieves the taxonomy for the current Categories widget instance. 173 194 * 174 195 * @since 4.4.0
Note: See TracChangeset
for help on using the changeset viewer.