If we are previewing don't show the admin bar. See #15856

git-svn-id: https://develop.svn.wordpress.org/trunk@17020 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-12-17 08:32:53 +00:00
parent 5ee410fd40
commit 6853258d19
1 changed files with 5 additions and 1 deletions

View File

@ -1147,6 +1147,10 @@ function preview_theme() {
if ( !current_user_can( 'switch_themes' ) ) if ( !current_user_can( 'switch_themes' ) )
return; return;
// Admin Thickbox requests
if ( isset( $_GET['preview_iframe'] ) )
show_admin_bar( false );
$_GET['template'] = preg_replace('|[^a-z0-9_./-]|i', '', $_GET['template']); $_GET['template'] = preg_replace('|[^a-z0-9_./-]|i', '', $_GET['template']);
if ( validate_file($_GET['template']) ) if ( validate_file($_GET['template']) )