Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#34626 closed enhancement (fixed)

Delete term meta when deleting a term

Reported by: barryceelen Owned by: boonebgorges
Priority: normal Milestone: 4.4
Component: Taxonomy Version: 4.4
Severity: normal Keywords: has-patch
Cc: Focuses:

Description


Attachments (2)

34626.patch (2.8 KB ) - added by barryceelen 11 years ago.
34626.1.patch (4.9 KB ) - added by barryceelen 11 years ago.
Fixes incorrect comment on delete_metadata_by_mid(), adds term meta code comment love to other meta functions

Download all attachments as: .zip

Change History (10)

@barryceelen
11 years ago

#1 @barryceelen
11 years ago

  • Keywords has-patch added

#2 @barryceelen
11 years ago

When deleting a post or user its meta values are deleted as well. The patch adds the same behaviour when deleting a term via wp_delete_term().

#3 @boonebgorges
11 years ago

  • Milestone Awaiting Review4.4
  • Owner set to boonebgorges
  • Status newassigned

Welcome to Trac, and thanks very much for the patch, @barryceelen ! Let's get this into 4.4.

#4 @boonebgorges
11 years ago

  • Resolutionfixed
  • Status assignedclosed

In 35585:

When deleting a term, delete its metadata as well.

Props barryceelen.
Fixes #34626.

#5 @swissspidy
11 years ago

"Type of object metadata is for (e.g., comment, post, meta, or user)."

Meta is wrong, it should be term.

@barryceelen
11 years ago

Fixes incorrect comment on delete_metadata_by_mid(), adds term meta code comment love to other meta functions

#6 @boonebgorges
11 years ago

Groan. Thanks, @swissspidy.

@barryceelen Thanks for the patch. To reduce churn, I'm going to leave these docblocks untouched. The description reads "e.g.", which means "for example". We don't need for the list to be comprehensive, and in fact, it can't be comprehensive since plugins can use these functions for custom metadata.

#7 @boonebgorges
11 years ago

In 35588:

Fix documentation typo introduced in [35585].

Props swissspidy, barryceelen.
See #34626.

#8 @barryceelen
11 years ago

@boonebgorges Sounds good + thanks for accepting my first patch!

Note: See TracTickets for help on using tickets.