Changeset 10246
- Timestamp:
- 12/23/2008 12:52:37 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r10239 r10246 440 440 * @param unknown_type $popular_cats 441 441 */ 442 function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false ) { 443 $walker = new Walker_Category_Checklist; 442 function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null ) { 443 if ( empty($walker) || !is_a($walker, 'Walker') ) 444 $walker = new Walker_Category_Checklist; 445 444 446 $descendants_and_self = (int) $descendants_and_self; 445 447 -
trunk/wp-includes/category-template.php
r10243 r10246 720 720 */ 721 721 function walk_category_tree() { 722 $walker = new Walker_Category;723 722 $args = func_get_args(); 723 // the user's options are the third parameter 724 if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') ) 725 $walker = new Walker_Category; 726 else 727 $walker = $args[2]['walker']; 728 724 729 return call_user_func_array(array( &$walker, 'walk' ), $args ); 725 730 } … … 733 738 */ 734 739 function walk_category_dropdown_tree() { 735 $walker = new Walker_CategoryDropdown;736 740 $args = func_get_args(); 741 // the user's options are the third parameter 742 if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') ) 743 $walker = new Walker_CategoryDropdown; 744 else 745 $walker = $args[2]['walker']; 746 737 747 return call_user_func_array(array( &$walker, 'walk' ), $args ); 738 748 }
Note: See TracChangeset
for help on using the changeset viewer.