Allow numbers in screen option IDs. Fixes setting posts per page for custom post types containing 0-9. Props SergeyBiryukov. fixes #18323

git-svn-id: https://develop.svn.wordpress.org/trunk@22253 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-10-17 13:09:17 +00:00
parent 7f2fa09f5c
commit 716617804c
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ function set_screen_options() {
$option = $_POST['wp_screen_options']['option'];
$value = $_POST['wp_screen_options']['value'];
if ( !preg_match( '/^[a-z_-]+$/', $option ) )
if ( $option != sanitize_key( $option ) )
return;
$map_option = $option;