Screen Options "Show on Screen [n] Posts" for custom post type containing digits in its name does not work
|Reported by:||vtowel||Owned by:||ryan|
- 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.
- On the manage screen for that custom post type, reveal the Screen Options.
- Enter a new value for the "Show on Screen [n] Posts" field, something other than the default value of 20.
- Click "Apply".
- Reveal the Screen Options again.
- 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.
Change History (12)
- Component changed from Validation to Post Types
- Milestone changed from Awaiting Review to 3.5