From 850007089783142a1c2707a8389b23d4ff16c937 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sun, 22 Feb 2009 10:09:30 +0000 Subject: [PATCH] Wrap the apply_filters call in a function_exists check as this can be called before it is defined. See #9205. git-svn-id: https://develop.svn.wordpress.org/trunk@10626 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 3aed0597f6..00cad7ec05 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1477,7 +1477,11 @@ function wp_get_nocache_headers() { 'Cache-Control' => 'no-cache, must-revalidate, max-age=0', 'Pragma' => 'no-cache', ); - return apply_filters('nocache_headers', $headers); + + if ( function_exists('apply_filters') ) { + $headers = apply_filters('nocache_headers', $headers); + } + return $headers; } /**