From 3fc11304a598cae5169862adf5d759f13b9cadee Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 18 Nov 2008 18:38:20 +0000 Subject: [PATCH] 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 --- wp-admin/admin-ajax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index a51ecd11fe..123419fd38 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -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();