Changes from trunk/wp-includes/category-template.php at r10159 to branches/2.7/wp-includes/category-template.php at r10317
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/wp-includes/category-template.php
r10159 r10317 398 398 if ( $show_option_all ) { 399 399 $show_option_all = apply_filters( 'list_cats', $show_option_all ); 400 $output .= "\t<option value='0'>$show_option_all</option>\n"; 400 $selected = ( '0' === strval($r['selected']) ) ? " selected='selected'" : ''; 401 $output .= "\t<option value='0'$selected>$show_option_all</option>\n"; 401 402 } 402 403 403 404 if ( $show_option_none ) { 404 405 $show_option_none = apply_filters( 'list_cats', $show_option_none ); 405 $output .= "\t<option value='-1'>$show_option_none</option>\n"; 406 $selected = ( '-1' === strval($r['selected']) ) ? " selected='selected'" : ''; 407 $output .= "\t<option value='-1'$selected>$show_option_none</option>\n"; 406 408 } 407 409 … … 444 446 * 'child_of' (int) default is 0 - See {@link get_categories()}. 445 447 * 'exclude' (string) - See {@link get_categories()}. 448 * 'exclude_tree' (string) - See {@link get_categories()}. 446 449 * 'echo' (bool|int) default is 1 - Whether to display or retrieve content. 447 450 * 'current_category' (int) - See {@link get_categories()}. … … 462 465 'hide_empty' => 1, 'use_desc_for_title' => 1, 463 466 'child_of' => 0, 'feed' => '', 'feed_type' => '', 464 'feed_image' => '', 'exclude' => '', ' current_category' => 0,467 'feed_image' => '', 'exclude' => '', 'exclude_tree' => '', 'current_category' => 0, 465 468 'hierarchical' => true, 'title_li' => __( 'Categories' ), 466 469 'echo' => 1, 'depth' => 0 … … 475 478 if ( isset( $r['show_date'] ) ) { 476 479 $r['include_last_update_time'] = $r['show_date']; 480 } 481 482 if ( true == $r['hierarchical'] ) { 483 $r['exclude_tree'] = $r['exclude']; 484 $r['exclude'] = ''; 477 485 } 478 486 … … 537 545 * be to return the top 45 tags in the tag cloud list. 538 546 * 539 * The 'topic_count_text_callback' argument is a function, which, given the count547 * The 'topic_count_text_callback' argument is a function, which, given the count 540 548 * of the posts with that tag, returns a text for the tooltip of the tag link. 541 * @see default_topic_count_text542 549 * 543 550 * The 'exclude' and 'include' arguments are used for the {@link get_tags()} … … 614 621 * The 'topic_count_text_callback' argument is a function, which given the count 615 622 * of the posts with that tag returns a text for the tooltip of the tag link. 616 * @see default_topic_count_text617 *618 623 * 619 624 * @todo Complete functionality. … … 650 655 uasort( $tags, create_function('$a, $b', 'return strnatcasecmp($a->name, $b->name);') ); 651 656 else 652 uasort( $tags, create_function('$a, $b', 'return ($a->count <$b->count);') );657 uasort( $tags, create_function('$a, $b', 'return ($a->count > $b->count);') ); 653 658 654 659 if ( 'DESC' == $order ) … … 721 726 */ 722 727 function walk_category_tree() { 723 $walker = new Walker_Category;724 728 $args = func_get_args(); 729 // the user's options are the third parameter 730 if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') ) 731 $walker = new Walker_Category; 732 else 733 $walker = $args[2]['walker']; 734 725 735 return call_user_func_array(array( &$walker, 'walk' ), $args ); 726 736 } … … 734 744 */ 735 745 function walk_category_dropdown_tree() { 736 $walker = new Walker_CategoryDropdown;737 746 $args = func_get_args(); 747 // the user's options are the third parameter 748 if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') ) 749 $walker = new Walker_CategoryDropdown; 750 else 751 $walker = $args[2]['walker']; 752 738 753 return call_user_func_array(array( &$walker, 'walk' ), $args ); 739 754 }
Note: See TracChangeset
for help on using the changeset viewer.