[wp-trac] [WordPress Trac] #41747: wp_set_post_tags() doesn't always replace old tags when $append is false

WordPress Trac noreply at wordpress.org
Mon Aug 28 21:38:06 UTC 2017


#41747: wp_set_post_tags() doesn't always replace old tags when $append is false
--------------------------+-----------------------------
 Reporter:  henry.wright  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 If the 3rd argument passed to {{{wp_set_post_tags()}}} is {{{false}}}, new
 tags will replace old tags.

 Imagine if post 42 is currently tagged "foo".

 {{{wp_set_post_tags( 42, array( 'bar' ), false );}}}

 Post 42 is now tagged "bar".

 However, imagine this scenario:

 {{{wp_set_post_tags( 42, array(), false );}}}

 Post 42 is still tagged "bar".

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


More information about the wp-trac mailing list