Opened 4 years ago
Last modified 14 months ago
#57619 new enhancement
register_taxonomy doesn't check for reserved terms
| Reported by: | milossh | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | 2nd-opinion |
| Cc: | Focuses: | coding-standards |
Description
Implement a check in register_taxonomy for reserved terms.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I had a list of 13 taxonomies to register for certain CPT. Of course, I knew about reserved terms, but It didn't occur to me to check and as the result I registered "themes" taxonomy. It worked fine, but I got a side effect that was difficult to discover as editors were using Thumbnail block to add Thumbnail and no one was complaining that "Set featured image" button is gone.
I think _doing_it_wrong() will be very useful to notify that word is reserved and cannot be used as taxonomy.