mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Don't array_slice in loop. Move it up.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d5bbb6214c
commit
01135095f3
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user