[wp-trac] [WordPress Trac] #58689: Add lowercase requirement to $taxonomy parameter of register_taxonomy()

WordPress Trac noreply at wordpress.org
Fri Jun 30 17:28:42 UTC 2023


#58689: Add lowercase requirement to $taxonomy parameter of register_taxonomy()
--------------------------+-----------------------------
 Reporter:  crstauf       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58689>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list