Ticket #2934: 2934.patch
| File 2934.patch, 1.9 KB (added by , 20 years ago) |
|---|
-
wp-includes/category.php
28 28 $where = 'cat_ID > 0'; 29 29 $inclusions = ''; 30 30 if ( !empty($include) ) { 31 $child_of = 0; //ignore child_of and exclude params if using include 32 $exclude = ''; 31 $child_of = 0; //ignore child_of and exclude params if using include 32 $exclude = ''; 33 33 $incategories = preg_split('/[\s,]+/',$include); 34 34 if ( count($incategories) ) { 35 35 foreach ( $incategories as $incat ) { … … 40 40 } 41 41 } 42 42 } 43 if (!empty($inclusions)) 44 $inclusions .= ')'; 43 if (!empty($inclusions)) 44 $inclusions .= ')'; 45 45 $where .= $inclusions; 46 46 47 47 $exclusions = ''; … … 57 57 } 58 58 } 59 59 } 60 if (!empty($exclusions)) 60 if (!empty($exclusions)) 61 61 $exclusions .= ')'; 62 $exclusions = apply_filters('list_cats_exclusions', $exclusions );62 $exclusions = apply_filters('list_cats_exclusions', $exclusions, $r ); 63 63 $where .= $exclusions; 64 64 65 65 $having = ''; … … 85 85 function stamp_cat($cat) { 86 86 global $cat_stamps; 87 87 $cat->last_update_timestamp = $cat_stamps[$cat->cat_ID]; 88 return $cat; 88 return $cat; 89 89 } 90 90 $categories = array_map('stamp_cat', $categories); 91 91 unset($cat_stamps); … … 94 94 if ( $child_of || $hierarchical ) 95 95 $categories = & _get_cat_children($child_of, $categories); 96 96 97 return apply_filters('get_categories', $categories );97 return apply_filters('get_categories', $categories, $r); 98 98 } 99 99 100 100 // Retrieves category data given a category ID or category object. … … 141 141 142 142 $categories = $wpdb->get_results("SELECT cat_ID, category_nicename, category_parent FROM $wpdb->categories WHERE category_nicename = '$leaf_path'"); 143 143 144 if ( empty($categories) ) 144 if ( empty($categories) ) 145 145 return NULL; 146 146 147 147 foreach ($categories as $category) {
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)