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:
parent
7f2fa09f5c
commit
716617804c
@ -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
Block a user