#29853 closed defect (bug) (fixed)
Introduce parity to 'taxonomy_parent_dropdown_args' filter.
Reported by: | TimothyBlynJacobs | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Taxonomy | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
In version 3.7 the taxonomy_parent_dropdown_args
filter was introduced in wp-admin/edit-tags.php
. For whatever reason, this filter is only on the new/list tag page, not the edit single tag page.
This patch applies the same drop down args filter that exists on the new/list page on the edit single tag page.
Attachments (3)
Change History (15)
#1
@
10 years ago
- Keywords has-patch added
- Version changed from trunk to 3.7
I think attachment is the way to go. We don't need a new filter, especially as they effect the same output for both screens. I could however see adding a third parameter, $context
that specifies the context the filter is running in.
#2
follow-up:
↓ 3
@
10 years ago
I'll add another patch. What would we use for the two values of $context
? Perhaps new
and edit
?
#3
in reply to:
↑ 2
@
10 years ago
Replying to TimothyBlynJacobs:
I'll add another patch. What would we use for the two values of
$context
? Perhapsnew
andedit
?
Good question. Maybe new-term
and edit-term
you think? When you add the third parameter, just also add a second @since
tag to the original hook doc. Something like this:
* @since 4.1.0 Added $context parameter.
#9
@
10 years ago
- Milestone changed from Awaiting Review to 4.2
It should be noted that there's an outside chance that applying the same filter to the tag edit interface will cause problems with plugins that expect it only to apply when creating a tag. That being said, I searched Github and the plugins repo for examples, but couldn't find any - the filter appears to be rarely used. And it's likely that in most cases, applying the filter is going to fix bugs rather than cause them. So let's go with it, and add the $context
param as DrewAPicture suggests.
I think 'new' and 'edit' are more straightforward values for $context
. "taxonomy" is in the filter name, so 'term' is redundant.
Filters the taxonomy dropdown args with a separate filter.