Make WordPress Core

Changeset 4013


Ignore:
Timestamp:
07/11/2006 03:33:25 AM (20 years ago)
Author:
ryan
Message:

Pass arg array to get_categories filters. Props ryanscheuermann. fixes #2934

File:
1 edited

Legend:

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

    r4007 r4013  
    2929        $inclusions = '';
    3030        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 = '';
    3333                $incategories = preg_split('/[\s,]+/',$include);
    3434                if ( count($incategories) ) {
     
    4141                }
    4242        }
    43         if (!empty($inclusions)) 
    44                 $inclusions .= ')';     
     43        if (!empty($inclusions))
     44                $inclusions .= ')';
    4545        $where .= $inclusions;
    4646
     
    5858                }
    5959        }
    60         if (!empty($exclusions)) 
     60        if (!empty($exclusions))
    6161                $exclusions .= ')';
    62         $exclusions = apply_filters('list_cats_exclusions', $exclusions );
     62        $exclusions = apply_filters('list_cats_exclusions', $exclusions, $r );
    6363        $where .= $exclusions;
    6464
     
    8686                        global $cat_stamps;
    8787                        $cat->last_update_timestamp = $cat_stamps[$cat->cat_ID];
    88                         return $cat;   
     88                        return $cat;
    8989                }
    9090                $categories = array_map('stamp_cat', $categories);
     
    9595                $categories = & _get_cat_children($child_of, $categories);
    9696
    97         return apply_filters('get_categories', $categories);
     97        return apply_filters('get_categories', $categories, $r);
    9898}
    9999
     
    142142        $categories = $wpdb->get_results("SELECT cat_ID, category_nicename, category_parent FROM $wpdb->categories WHERE category_nicename = '$leaf_path'");
    143143
    144         if ( empty($categories) ) 
     144        if ( empty($categories) )
    145145                return NULL;
    146146
Note: See TracChangeset for help on using the changeset viewer.