From 568620021d02a0fe07b39af3277ed1f1758ad8f3 Mon Sep 17 00:00:00 2001 From: scribu Date: Thu, 28 Oct 2010 19:09:18 +0000 Subject: [PATCH] Introduce get_terms_args filter. Fixes #15020 git-svn-id: http://svn.automattic.com/wordpress/trunk@16059 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 4cb03baf16..7ca31154a3 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -911,7 +911,7 @@ function &get_terms($taxonomies, $args = '') { $taxonomies = array($taxonomies); } - foreach ( (array) $taxonomies as $taxonomy ) { + foreach ( $taxonomies as $taxonomy ) { if ( ! taxonomy_exists($taxonomy) ) { $error = & new WP_Error('invalid_taxonomy', __('Invalid Taxonomy')); return $error; @@ -940,6 +940,8 @@ function &get_terms($taxonomies, $args = '') { $args['pad_counts'] = false; } + $args = apply_filters( 'get_terms_args', $args, $taxonomies ); + extract($args, EXTR_SKIP); if ( $child_of ) {