[wp-trac] [WordPress Trac] #29848: Caching problems when using 'alias_of' in wp_update_term() and wp_insert_term()
WordPress Trac
noreply at wordpress.org
Thu Oct 9 02:31:37 UTC 2014
#29848: Caching problems when using 'alias_of' in wp_update_term() and
wp_insert_term()
--------------------------+---------------------------
Reporter: boonebgorges | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.1
Component: Taxonomy | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
--------------------------+---------------------------
Changes (by boonebgorges):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"29862"]:
{{{
#!CommitTicketReference repository="" revision="29862"
Improve 'alias_of' handling in wp_insert_term() and wp_update_term().
Using get_term_by() rather than direct SQL queries to fetch the alias term
fixes a number of issues:
* Object cache for aliased term is properly cleared after update.
* If the aliased term is in the object cache, it's served from there,
saving a database query.
* Duplicate 'edit_terms' and 'edited_terms' hooks can be removed.
* Fix a PHP notice when the 'alias_of' term is not found.
* Prevent the incorrect creation of a new term group for the primary term
when the 'alias_of' term is not found.
Adds unit tests for 'alias_of' functionality in both functions.
Fixes #29848.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29848#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list