WordPress.org

Make WordPress Core

Ticket #12981: exclude_tree.diff

File exclude_tree.diff, 545 bytes (added by tott, 5 years ago)

Possible patch for exclude_tree problem in wp_list_categories()

Line 
1Index: category-template.php
2===================================================================
3--- category-template.php       (revision 14075)
4+++ category-template.php       (working copy)
5@@ -%ld,%ld +%ld,%ld @@
6        if ( isset( $r['show_date'] ) )
7                $r['include_last_update_time'] = $r['show_date'];
8 
9-       if ( true == $r['hierarchical'] ) {
10+       if ( true == $r['hierarchical'] && empty( $r['exclude_tree'] ) ) {
11                $r['exclude_tree'] = $r['exclude'];
12                $r['exclude'] = '';
13        }
14@@ -%ld,%ld +%ld,%ld @@
15        return $r;
16 }
17 
18-?>
19\ No newline at end of file
20+?>