From 042acc0a4ac0cc146ebdb6985b0cefa1e4610196 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 6 Feb 2005 06:13:26 +0000 Subject: [PATCH] Don't array_slice in loop. Move it up. git-svn-id: https://develop.svn.wordpress.org/trunk@2229 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index b900ca3667..dc26fbb351 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -896,14 +896,15 @@ function merge_filters($tag) { function apply_filters($tag, $string) { global $wp_filter; + $args = array_slice(func_get_args(), 3); + merge_filters($tag); if (isset($wp_filter[$tag])) { foreach ($wp_filter[$tag] as $priority => $functions) { if (!is_null($functions)) { foreach($functions as $function) { - $args = array($string) + array_slice(func_get_args(), 3); - $string = call_user_func_array($function, $args); + $string = call_user_func_array($function, array($string) + $args); } } }