Trim the option name in get_option() before calling the pre_option_$option filter, not after. props evansolomon. fixes #22358.

git-svn-id: https://develop.svn.wordpress.org/trunk@22633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-17 13:20:57 +00:00
parent 2b88e9eb56
commit 2f1e3701ed
1 changed files with 4 additions and 4 deletions

View File

@ -32,15 +32,15 @@
function get_option( $option, $default = false ) {
global $wpdb;
$option = trim( $option );
if ( empty( $option ) )
return false;
// Allow plugins to short-circuit options.
$pre = apply_filters( 'pre_option_' . $option, false );
if ( false !== $pre )
return $pre;
$option = trim($option);
if ( empty($option) )
return false;
if ( defined( 'WP_SETUP_CONFIG' ) )
return false;