[wp-trac] [WordPress Trac] #18323: Screen Options "Show on Screen [n] Posts" for custom post type containing digits in its name does not work

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 3 20:38:50 UTC 2011


#18323: Screen Options "Show on Screen [n] Posts" for custom post type containing
digits in its name does not work
--------------------------+-----------------------------
 Reporter:  vtowel        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Validation    |    Version:  3.2.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 1. In a plugin, write the code to register a custom post type called
 "all_in_1_event", or any other name that contains a digit.
 2. On the manage screen for that custom post type, reveal the Screen
 Options.
 3. Enter a new value for the "Show on Screen [n] Posts" field, something
 other than the default value of 20.
 4. Click "Apply".
 5. Reveal the Screen Options again.
 6. The new value has not been saved.

 It seems to be that this is because of a check that occurs in the
 set_screen_options() function (misc.php, line 331). The option name is not
 allowed to contain digits - only letters, dashes and underscores - and I
 don't understand why. Our custom post type does contain a digit, and it
 has never been a problem for us before - except for saving the Screen
 Options.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18323>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list