[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
Fri Oct 3 15:38: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:  accepted
 Priority:  normal        |   Milestone:  4.1
Component:  Taxonomy      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------------

Comment (by DrewAPicture):

 Replying to [comment:5 boonebgorges]:
 > Replying to [comment:4 DrewAPicture]:
 > > The only thing I'd be concerned about with removing the duplicate
 hooks is that it's possible somebody could be relying on that behavior.
 It's pretty edge and bordering on misuse, but worth considering.
 >
 > The hooks still fire in 29848.2.patch - they just fire in
 wp_update_term(). I think they were added before and after the direct db
 calls in order to provide parity with wp_update_term(), but using the API
 function means that this duplication is no longer necessary.

 Sorry if I wasn't clear. What I meant was that it's possible people have
 workarounds in place to ''handle'' the duplicate filters.

 Also, the hook doc that was converted to a comment in wp-
 includes/taxonomy.php should use `/*` to open instead of `/**` so it isn't
 mistakenly picked up as a docblock in the parser. The same goes for the
 new comment above this line further down:
 {{{
 $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms") +
 1;
 }}}

 The [syntax] for multi-line comments is simply:
 {{{
 /*
  * first line
  * second line
  */
 }}}

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


More information about the wp-trac mailing list