Opened 8 years ago
Closed 8 years ago
#38006 closed defect (bug) (fixed)
wp_remove_object_terms() should pass $taxonomy to its actions
Reported by: | boonebgorges | Owned by: | Takahashi_Fumiki |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | needs-patch |
Focuses: | Cc: |
Description
wp_set_object_terms()
passes the $taxonomy
parameter to its actions, but wp_remove_object_terms()
does not. This makes it hard to target term removal for specific taxonomies.
Attachments (3)
Change History (9)
#1
@
8 years ago
@boonebgorges function wp_remove_object_terms()
doesn't seem to have set_object_terms
actions equivalent.
So, I add a new param to deleted_term_relationships
action but it is equivalent of added_term_relationship
.
This ticket was mentioned in Slack in #core by mike. View the logs.
8 years ago
@
8 years ago
Add 3rd param $taxonomuy to 'deleted_term_relationships', 'delete_term_relationships', 'added_term_relationship', 'add_term_relationship' actions.
#3
@
8 years ago
wp_remove_object_terms()
function doesn't have the equivalent of set_object_terms
action.
Add new argument $taxonomy to all of actions below:
- add_term_relationship
- added_term_relationship
- delete_term_relationships
- deleted_term_relationships
They don't equals completely (singular/plural), but they are similar.
#4
@
8 years ago
- Keywords good-first-bug removed
- Milestone changed from Future Release to 4.7
- Owner set to Takahashi_Fumiki
- Status changed from new to assigned
This looks great, @Takahashi_Fumiki. Thanks for the patch!
One more small request: Could you please add @since
annotations for the new parameters? Something like:
* @since 4.7.0 Added the `$taxonomy` parameter.
See https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#since-section-changelogs for more information.
Add 3rd param to 'deleted_term_relationships' action.