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