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: http://core.svn.wordpress.org/trunk@22253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-10-17 13:09:17 +00:00
parent 19d83ff7e8
commit bcbc0b65ac
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;