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:
parent
ef80d8cb30
commit
3fc11304a5
|
@ -819,7 +819,7 @@ case 'closed-postboxes' :
|
||||||
$hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : '';
|
$hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : '';
|
||||||
$hidden = explode( ',', $_POST['hidden'] );
|
$hidden = explode( ',', $_POST['hidden'] );
|
||||||
$page = isset( $_POST['page'] )? $_POST['page'] : '';
|
$page = isset( $_POST['page'] )? $_POST['page'] : '';
|
||||||
if ( !preg_match( '/^[a-z-]+$/', $page ) ) {
|
if ( !preg_match( '/^[a-z-_]+$/', $page ) ) {
|
||||||
die(-1);
|
die(-1);
|
||||||
}
|
}
|
||||||
$current_user = wp_get_current_user();
|
$current_user = wp_get_current_user();
|
||||||
|
@ -833,7 +833,7 @@ case 'hidden-columns' :
|
||||||
$hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : '';
|
$hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : '';
|
||||||
$hidden = explode( ',', $_POST['hidden'] );
|
$hidden = explode( ',', $_POST['hidden'] );
|
||||||
$page = isset( $_POST['page'] )? $_POST['page'] : '';
|
$page = isset( $_POST['page'] )? $_POST['page'] : '';
|
||||||
if ( !preg_match( '/^[a-z-]+$/', $page ) ) {
|
if ( !preg_match( '/^[a-z-_]+$/', $page ) ) {
|
||||||
die(-1);
|
die(-1);
|
||||||
}
|
}
|
||||||
$current_user = wp_get_current_user();
|
$current_user = wp_get_current_user();
|
||||||
|
|
Loading…
Reference in New Issue