Changeset 644407
- Timestamp:
- 12/25/2012 05:42:26 PM (13 years ago)
- Location:
- display-categories-widget/trunk
- Files:
-
- 3 edited
-
display_categories_widget.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
screenshot-2.jpg (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
display-categories-widget/trunk/display_categories_widget.php
r587701 r644407 23 23 $title = $instance['title']; 24 24 $category = $instance['category']; 25 $dcw_limit = $instance['dcw_limit']; 25 26 26 27 // Get the existing categories and build a simple select dropdown for the user. … … 35 36 36 37 ?> 37 <p><label for="<?php echo $this->get_field_id('title'); ?>"> Title:<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>38 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p> 38 39 <!--<p><label for="<?php echo $this->get_field_id('cat_id'); ?>">Category id: <input class="widefat" id="<?php echo $this->get_field_id('cat_id'); ?>" name="<?php echo $this->get_field_name('cat_id'); ?>" type="text" value="<?php echo attribute_escape($cat_id); ?>" /></label></p>--> 39 40 … … 46 47 </select> 47 48 </p> 48 49 <p><label for="<?php echo $this->get_field_id('dcw_limit'); ?>"><?php _e('Limit (optional):'); ?> <input class="widefat" id="<?php echo $this->get_field_id('dcw_limit'); ?>" name="<?php echo $this->get_field_name('dcw_limit'); ?>" type="text" value="<?php echo attribute_escape($dcw_limit); ?>" /></label></p> 49 50 <?php 50 51 } … … 55 56 $instance['title'] = $new_instance['title']; 56 57 $instance['category'] = $new_instance['category']; 58 $instance['dcw_limit'] = $new_instance['dcw_limit']; 57 59 return $instance; 58 60 } … … 65 67 $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); 66 68 $cat_id = $instance['category']; 69 $dcw_limit = $instance['dcw_limit']; 67 70 68 71 if (!empty($title)) 69 72 echo $before_title . $title . $after_title;; 70 73 echo "<ul>"; 71 wp_list_categories('orderby=name&child_of='.$cat_id.'&hide_empty=0&title_li= ');74 wp_list_categories('orderby=name&child_of='.$cat_id.'&hide_empty=0&title_li=&number='.$dcw_limit); 72 75 echo "</ul>"; 73 76 -
display-categories-widget/trunk/readme.txt
r644223 r644407 5 5 Requires at least: 3.3 6 6 Tested up to: 3.5 7 Stable tag: 4.37 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 36 36 == Changelog == 37 = 1.0.2 = 38 * Limit the number of categories that is displayed 39 37 40 = 1.0.1 = 38 41 * Description Updated
Note: See TracChangeset
for help on using the changeset viewer.