Make WordPress Core

Changeset 22633


Ignore:
Timestamp:
11/17/2012 01:20:57 PM (12 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/option.php

    r22256 r22633  
    3333    global $wpdb;
    3434
     35    $option = trim( $option );
     36    if ( empty( $option ) )
     37        return false;
     38
    3539    // Allow plugins to short-circuit options.
    3640    $pre = apply_filters( 'pre_option_' . $option, false );
    3741    if ( false !== $pre )
    3842        return $pre;
    39 
    40     $option = trim($option);
    41     if ( empty($option) )
    42         return false;
    4343
    4444    if ( defined( 'WP_SETUP_CONFIG' ) )
Note: See TracChangeset for help on using the changeset viewer.