Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#41747 closed defect (bug) (invalid)

wp_set_post_tags() doesn't always replace old tags when $append is false

Reported by: henry.wright Owned by:
Priority: normal Milestone:
Component: Taxonomy Version:
Severity: normal Keywords:
Cc: Focuses:

Description

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".

Change History (2)

#1 @henry.wright
9 years ago

  • Resolutioninvalid
  • Status newclosed

I retested this and old tags are replaced. Closing.

#2 @SergeyBiryukov
9 years ago

  • Component GeneralTaxonomy
  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.