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:
parent
19d83ff7e8
commit
bcbc0b65ac
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue