#18263 closed enhancement (wontfix)
Doing it Wrong for Taxonomies
Reported by: | WraithKenny | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2.1 |
Component: | Warnings/Notices | Keywords: | has-patch |
Focuses: | Cc: |
Description
Doing it Wrong messages should be giving for registering taxonomies with reserved terms.
Attachments (3)
Change History (11)
#2
@
13 years ago
Some patch feedback I wrote before I saw nacin's reply but that I'm posting anyway:
- Tabs shouldn't be used inline. Look how weird that array looks in Trac. Your tab sizes are different than what Trac and my text editor uses. ;) Simple solution is to just add a line break before the first item which the standard way in WordPress:
$foo = array( 'item1', 'item2', );
- It doesn't seem like a good idea for maintainability reasons to keep a separate list of built-in taxonomies. It'd be better to dynamically build this list.
- The code for generating the list for the Codex shouldn't go into core. It's trivial to create by hand and the code could instead be stored somewhere on the Codex.
#4
@
13 years ago
- Resolution duplicate deleted
- Status changed from closed to reopened
Related to #12917 which is marked invalid, so I assume from Nacin's comment that fixing the Media Library so type
can be registered as a taxonomy is the way to go? type
does seem to be the lone term that causes issues. Regardless, the code dealing with that ticket's issue has been removed from these newer patches.
Related to #15824 which is set to fixed so I had assumed opening new tickets for new _doing_it_wrong
calls. I'm reopening this one with that in mind.
As for the tabs: I'm hoping that since I've only tabbed 2 deep this time, it shouldn't be a problem :-)
I had included the core-registered taxonomies merely for completeness (and notice for the type
issue), which is removed in the newer patches. The check for _builtin
prevents trigger_error
against core registrations. The list is pulled only from the query vars now.
I had occurred to me after work, that plugins that register the same taxonomy twice would receive the error (via public_query_vars
), and it wouldn't make sense.
tax-doin-wrong-3.patch
prevents trigger_errors
on twice registered taxonomies at the cost of a global. (I left the global in my code block for review, but I can resubmit the patch with it at the top of the function.)
I don't think the existing taxonomies need to be "reserved". Also, as mentioned in IRC, this is a duplicate of another ticket.
The issue I've generally seen is that "type" breaks the media uploader. I'd rather fix that.