Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r10317 r10159  
    398398        if ( $show_option_all ) {
    399399            $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";
    402401        }
    403402
    404403        if ( $show_option_none ) {
    405404            $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";
    408406        }
    409407
     
    446444 *     'child_of' (int) default is 0 - See {@link get_categories()}.
    447445 *     'exclude' (string) - See {@link get_categories()}.
    448  *     'exclude_tree' (string) - See {@link get_categories()}.
    449446 *     'echo' (bool|int) default is 1 - Whether to display or retrieve content.
    450447 *     'current_category' (int) - See {@link get_categories()}.
     
    465462        'hide_empty' => 1, 'use_desc_for_title' => 1,
    466463        'child_of' => 0, 'feed' => '', 'feed_type' => '',
    467         'feed_image' => '', 'exclude' => '', 'exclude_tree' => '', 'current_category' => 0,
     464        'feed_image' => '', 'exclude' => '', 'current_category' => 0,
    468465        'hierarchical' => true, 'title_li' => __( 'Categories' ),
    469466        'echo' => 1, 'depth' => 0
     
    478475    if ( isset( $r['show_date'] ) ) {
    479476        $r['include_last_update_time'] = $r['show_date'];
    480     }
    481 
    482     if ( true == $r['hierarchical'] ) {
    483         $r['exclude_tree'] = $r['exclude'];
    484         $r['exclude'] = '';
    485477    }
    486478
     
    545537 * be to return the top 45 tags in the tag cloud list.
    546538 *
    547  * The 'topic_count_text_callback' argument is a function, which, given the count
     539* The 'topic_count_text_callback' argument is a function, which, given the count
    548540 * of the posts  with that tag, returns a text for the tooltip of the tag link.
     541 * @see default_topic_count_text
    549542 *
    550543 * The 'exclude' and 'include' arguments are used for the {@link get_tags()}
     
    621614 * The 'topic_count_text_callback' argument is a function, which given the count
    622615 * of the posts  with that tag returns a text for the tooltip of the tag link.
     616 * @see default_topic_count_text
     617 *
    623618 *
    624619 * @todo Complete functionality.
     
    655650        uasort( $tags, create_function('$a, $b', 'return strnatcasecmp($a->name, $b->name);') );
    656651    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);') );
    658653
    659654    if ( 'DESC' == $order )
     
    726721 */
    727722function walk_category_tree() {
     723    $walker = new Walker_Category;
    728724    $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 
    735725    return call_user_func_array(array( &$walker, 'walk' ), $args );
    736726}
     
    744734 */
    745735function walk_category_dropdown_tree() {
     736    $walker = new Walker_CategoryDropdown;
    746737    $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 
    753738    return call_user_func_array(array( &$walker, 'walk' ), $args );
    754739}
Note: See TracChangeset for help on using the changeset viewer.