Opened 3 years ago
Closed 3 years ago
#56352 closed defect (bug) (fixed)
Docs: Clarify that `register_taxonomy()` only accepts lowercase values for the `$taxonomy` parameter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | good-first-bug has-patch commit |
Focuses: | docs | Cc: |
Description
This issue was pointed out by @bengreeley in a DevHub User Contributed note:
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 (see #16600).
This page mentions lowercase [JB: `register_taxonomy` devhub page] 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.
Attachments (3)
Change History (9)
This ticket was mentioned in Slack in #docs by benjgrolleau. View the logs.
3 years ago
#3
@
3 years ago
Thanks for the patch @dipakparmar443! Looks like there is a small typo: "Must" should be lowercase as it follows a comma :)
I have update the inline document in attached patch file