Allow underscores in page names for meta box and column requests. see #8246

git-svn-id: http://svn.automattic.com/wordpress/trunk@9759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-18 18:38:20 +00:00
parent ef80d8cb30
commit 3fc11304a5
1 changed files with 2 additions and 2 deletions

View File

@ -819,7 +819,7 @@ case 'closed-postboxes' :
$hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : '';
$hidden = explode( ',', $_POST['hidden'] );
$page = isset( $_POST['page'] )? $_POST['page'] : '';
if ( !preg_match( '/^[a-z-]+$/', $page ) ) {
if ( !preg_match( '/^[a-z-_]+$/', $page ) ) {
die(-1);
}
$current_user = wp_get_current_user();
@ -833,7 +833,7 @@ case 'hidden-columns' :
$hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : '';
$hidden = explode( ',', $_POST['hidden'] );
$page = isset( $_POST['page'] )? $_POST['page'] : '';
if ( !preg_match( '/^[a-z-]+$/', $page ) ) {
if ( !preg_match( '/^[a-z-_]+$/', $page ) ) {
die(-1);
}
$current_user = wp_get_current_user();