Ticket #8682: 8682.001.diff
| File 8682.001.diff, 1.9 KB (added by , 17 years ago) |
|---|
-
wp-includes/category-template.php
717 717 * @see Walker_Category::walk() for parameters and return description. 718 718 */ 719 719 function walk_category_tree() { 720 $walker = new Walker_Category;721 720 $args = func_get_args(); 721 // the user's options are the third parameter 722 if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') ) 723 $walker = new Walker_Category; 724 else 725 $walker = $args[2]['walker']; 726 722 727 return call_user_func_array(array( &$walker, 'walk' ), $args ); 723 728 } 724 729 … … 730 735 * @see Walker_CategoryDropdown::walk() for parameters and return description. 731 736 */ 732 737 function walk_category_dropdown_tree() { 733 $walker = new Walker_CategoryDropdown;734 738 $args = func_get_args(); 739 // the user's options are the third parameter 740 if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') ) 741 $walker = new Walker_CategoryDropdown; 742 else 743 $walker = $args[2]['walker']; 744 735 745 return call_user_func_array(array( &$walker, 'walk' ), $args ); 736 746 } 737 747 -
wp-admin/includes/template.php
439 439 * @param unknown_type $selected_cats 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 446 448 $args = array();