Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #5809, comment 151


Ignore:
Timestamp:
01/28/2015 09:46:43 PM (10 years ago)
Author:
boonebgorges
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5809, comment 151

    initial v1  
    1 [attachment:5809.6.patch] refreshes the patch for trunk. The term splitting logic is as before: on `wp_update_term()`, if the term being updated is shared with another term, assign the updated term with a new ID.
     1[attachment:5809.6.patch] refreshes the patch for trunk. The term splitting logic is as before: on `wp_update_term()`, if the term being updated is shared with another term, assign a new term_id to the updated term.
    22
    33Plugins that store term_ids may experience miscellaneous breakage when term_ids change; see #30335. There are two mechanisms in the patch to ease the transition. (1) Hooking to the `'split_shared_term'` action will allow plugins to make the necessary adjustments at the time of splitting. This action was in previous versions of the patch. (2) A new addition to this patch is `wp_get_split_terms( $term_id, $taxonomy = '' )`. We will store information about previously split terms in an options array, and this new function provides controlled access to the array. In this way, any plugin that needs to go back and see which terms have been split (given the old term_id) can use this function to do necessary cleanup.