WordPress.org

Make WordPress Core

Changeset 11061


Ignore:
Timestamp:
04/22/2009 10:32:35 PM (9 years ago)
Author:
ryan
Message:

Always display the default header when previewing a theme. Props Viper007Bond. fixes #9152

File:
1 edited

Legend:

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

    r11013 r11061  
    876876        return;
    877877
    878     add_filter('template', create_function('', "return '{$_GET['template']}';") );
     878    add_filter( 'template', create_function('', "return '{$_GET['template']}';") );
    879879
    880880    if ( isset($_GET['stylesheet']) ) {
     
    882882        if ( validate_file($_GET['stylesheet']) )
    883883            return;
    884         add_filter('stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
     884        add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
    885885    }
     886
     887    // Prevent theme mods to current theme being used on theme being previewed
     888    add_filter( 'pre_option_mods_' . get_current_theme(), create_function( '', "return array();" ) );
    886889
    887890    ob_start( 'preview_theme_ob_filter' );
Note: See TracChangeset for help on using the changeset viewer.