Quote array indexes. Props wet. fixes #7502
git-svn-id: https://develop.svn.wordpress.org/trunk@8629 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b7d641c8fd
commit
935afabf92
@ -505,18 +505,18 @@ function preview_theme() {
|
|||||||
if ( !current_user_can( 'switch_themes' ) )
|
if ( !current_user_can( 'switch_themes' ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$_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']) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
add_filter('template', create_function('', "return '$_GET[template]';") );
|
add_filter('template', create_function('', "return '{$_GET['template']}';") );
|
||||||
|
|
||||||
if ( isset($_GET['stylesheet']) ) {
|
if ( isset($_GET['stylesheet']) ) {
|
||||||
$_GET[stylesheet] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET[stylesheet]);
|
$_GET['stylesheet'] = preg_replace('|[^a-z0-9_.-]|i', '', $_GET['stylesheet']);
|
||||||
if ( validate_file($_GET[stylesheet]) )
|
if ( validate_file($_GET['stylesheet']) )
|
||||||
return;
|
return;
|
||||||
add_filter('stylesheet', create_function('', "return '$_GET[stylesheet]';") );
|
add_filter('stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start( 'preview_theme_ob_filter' );
|
ob_start( 'preview_theme_ob_filter' );
|
||||||
|
Loading…
Reference in New Issue
Block a user