#58689 closed defect (bug) (invalid)
Add lowercase requirement to $taxonomy parameter of register_taxonomy()
Reported by: | crstauf | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | docs | Cc: |
Description
Reported by @bengreeley on User Contributed Notes:
I have feedback for the description of the parameter for $taxonomy. Both register_taxonomy() and register_post_type() have a known bug where the taxonomy or post type name needs to be lowercase to work properly (#16600).
[The documentation (https://developer.wordpress.org/reference/functions/register_taxonomy/)] mentions lowercase in ‘Additional Parameter Information’, which is buried a bit deeper on the page. I’d recommend to update this page to include language such as “may only contain lowercase alphanumeric characters” in the main parameter section for $taxonomy, similar to the way it’s added for register_post_type() at https://developer.wordpress.org/reference/functions/register_post_type/
Since using anything but uppercase can lead to serious issues that have yet to be resolved I think making this more obvious would be beneficial to the end user.