WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/30/2008 10:30:54 PM (11 years ago)
Author:
ryan
Message:

Add exclude_tree for categories. Make exclude behave like exclude_tree when hierarchical to restore < 2.7 behavior. Props filosofo. fixes #8614 for 2.7

File:
1 edited

Legend:

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

    r10245 r10276  
    446446 *     'child_of' (int) default is 0 - See {@link get_categories()}.
    447447 *     'exclude' (string) - See {@link get_categories()}.
     448 *     'exclude_tree' (string) - See {@link get_categories()}.
    448449 *     'echo' (bool|int) default is 1 - Whether to display or retrieve content.
    449450 *     'current_category' (int) - See {@link get_categories()}.
     
    464465        'hide_empty' => 1, 'use_desc_for_title' => 1,
    465466        'child_of' => 0, 'feed' => '', 'feed_type' => '',
    466         'feed_image' => '', 'exclude' => '', 'current_category' => 0,
     467        'feed_image' => '', 'exclude' => '', 'exclude_tree' => '', 'current_category' => 0,
    467468        'hierarchical' => true, 'title_li' => __( 'Categories' ),
    468469        'echo' => 1, 'depth' => 0
     
    477478    if ( isset( $r['show_date'] ) ) {
    478479        $r['include_last_update_time'] = $r['show_date'];
     480    }
     481
     482    if ( true == $r['hierarchical'] ) {
     483        $r['exclude_tree'] = $r['exclude'];
     484        $r['exclude'] = '';
    479485    }
    480486
Note: See TracChangeset for help on using the changeset viewer.