[wp-trac] [WordPress Trac] #29848: Cache is not flushed term A when creating a new term with A as an alias

WordPress Trac noreply at wordpress.org
Fri Oct 3 02:39:07 UTC 2014


#29848: Cache is not flushed term A when creating a new term with A as an alias
--------------------------+-----------------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.1
Component:  Taxonomy      |    Version:
 Severity:  minor         |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------
 See https://core.trac.wordpress.org/browser/tags/4.0/src/wp-
 includes/taxonomy.php?annotate=blame#L2448

 When creating a new term using `wp_insert_term()` and passing the
 `alias_of` parameter, the term_group of the aliased term is updated (see
 line 2467). However, the cache for this item is not cleared.

 We should use `wp_update_term()` here instead of a direct database query.
 This takes care of caching for us. It also allows us to remove these
 duplicate 'edit_terms' and 'edited_terms' hooks.

 Patch attached.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29848>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list