Fix apply_filters. Bug 777.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8b0d256a44
commit
f924bec2f3
|
@ -890,14 +890,13 @@ function merge_filters($tag) {
|
|||
function apply_filters($tag, $string) {
|
||||
global $wp_filter;
|
||||
|
||||
$args = array($string) + 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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue