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

git-svn-id: https://develop.svn.wordpress.org/trunk@11061 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-22 22:32:35 +00:00
parent 7af4f1b84d
commit c43d9ccbdc
1 changed files with 5 additions and 2 deletions

View File

@ -884,6 +884,9 @@ function preview_theme() {
add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
}
// Prevent theme mods to current theme being used on theme being previewed
add_filter( 'pre_option_mods_' . get_current_theme(), create_function( '', "return array();" ) );
ob_start( 'preview_theme_ob_filter' );
}
add_action('setup_theme', 'preview_theme');