Allow underscore and dash in theme dirs when previewing. fixes #7236

git-svn-id: https://develop.svn.wordpress.org/trunk@8252 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-07-03 23:10:28 +00:00
parent 4879aa85b4
commit ac50ccc1a2
1 changed files with 2 additions and 2 deletions

View File

@ -486,12 +486,12 @@ function preview_theme() {
if ( !current_user_can( 'switch_themes' ) )
return;
$_GET[template] = preg_replace('|[^a-z0-9]|i', '', $_GET[template]);
$_GET[template] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[template]);
add_filter('template', create_function('', "return '$_GET[template]';") );
if ( isset($_GET['stylesheet']) ) {
$_GET[stylesheet] = preg_replace('|[^a-z0-9]|i', '', $_GET[stylesheet]);
$_GET[stylesheet] = preg_replace('|[^a-z0-9_-]|i', '', $_GET[stylesheet]);
add_filter('stylesheet', create_function('', "return '$_GET[stylesheet]';") );
}