summaryrefslogtreecommitdiffstats
path: root/wp-includes/category.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-07-11 09:05:58 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-07-11 09:05:58 +0000
commitbe846080ae26c7358610f85a75034425a39b0dff (patch)
tree5accb8da9682bfbc61763c1220f0e8fa3a496a6e /wp-includes/category.php
parentcd78f6c49a3370eea1df8fb85d84ac7ac58fe1d5 (diff)
downloadwordpress-mu-be846080ae26c7358610f85a75034425a39b0dff.tar.gz
wordpress-mu-be846080ae26c7358610f85a75034425a39b0dff.tar.xz
wordpress-mu-be846080ae26c7358610f85a75034425a39b0dff.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@645 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/category.php')
-rw-r--r--wp-includes/category.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/wp-includes/category.php b/wp-includes/category.php
index fb0ec87..8c73e6c 100644
--- a/wp-includes/category.php
+++ b/wp-includes/category.php
@@ -28,8 +28,8 @@ function &get_categories($args = '') {
$where = 'cat_ID > 0';
$inclusions = '';
if ( !empty($include) ) {
- $child_of = 0; //ignore child_of and exclude params if using include
- $exclude = '';
+ $child_of = 0; //ignore child_of and exclude params if using include
+ $exclude = '';
$incategories = preg_split('/[\s,]+/',$include);
if ( count($incategories) ) {
foreach ( $incategories as $incat ) {
@@ -40,8 +40,8 @@ function &get_categories($args = '') {
}
}
}
- if (!empty($inclusions))
- $inclusions .= ')';
+ if (!empty($inclusions))
+ $inclusions .= ')';
$where .= $inclusions;
$exclusions = '';
@@ -57,9 +57,9 @@ function &get_categories($args = '') {
}
}
}
- if (!empty($exclusions))
+ if (!empty($exclusions))
$exclusions .= ')';
- $exclusions = apply_filters('list_cats_exclusions', $exclusions );
+ $exclusions = apply_filters('list_cats_exclusions', $exclusions, $r );
$where .= $exclusions;
$having = '';
@@ -85,7 +85,7 @@ function &get_categories($args = '') {
function stamp_cat($cat) {
global $cat_stamps;
$cat->last_update_timestamp = $cat_stamps[$cat->cat_ID];
- return $cat;
+ return $cat;
}
$categories = array_map('stamp_cat', $categories);
unset($cat_stamps);
@@ -94,7 +94,7 @@ function &get_categories($args = '') {
if ( $child_of || $hierarchical )
$categories = & _get_cat_children($child_of, $categories);
- return apply_filters('get_categories', $categories);
+ return apply_filters('get_categories', $categories, $r);
}
// Retrieves category data given a category ID or category object.
@@ -115,6 +115,8 @@ function &get_category(&$category, $output = OBJECT) {
}
}
+ $_category = apply_filters('get_category', $_category);
+
if ( $output == OBJECT ) {
return $_category;
} elseif ( $output == ARRAY_A ) {
@@ -139,7 +141,7 @@ function get_category_by_path($category_path, $full_match = true, $output = OBJE
$categories = $wpdb->get_results("SELECT cat_ID, category_nicename, category_parent FROM $wpdb->categories WHERE category_nicename = '$leaf_path'");
- if ( empty($categories) )
+ if ( empty($categories) )
return NULL;
foreach ($categories as $category) {