From 6f9eaf5df521e0664676dc00c3e8f8fa477893cb Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 21 Nov 2014 03:13:22 +0000 Subject: [PATCH] Store data about old and new term IDs when shared terms are split. Props mboynes. See #30335. Built from https://develop.svn.wordpress.org/trunk@30492 git-svn-id: http://core.svn.wordpress.org/trunk@30481 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index daf48e83e7..5936fb3d1f 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -4115,6 +4115,11 @@ function _split_shared_term( $term_id, $term_taxonomy_id ) { clean_term_cache( $term_id, $shared_term_taxonomy ); } + // Keep a record of term_ids that have been split, keyed by old term_id. + $split_term_data = get_option( '_split_terms_' . $term_taxonomy->taxonomy, array() ); + $split_term_data[ $term_id ] = $new_term_id; + update_option( '_split_terms_' . $term_taxonomy->taxonomy, $split_term_data ); + /** * Fires after a previously shared taxonomy term is split into two separate terms. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 8b6874bdeb..9eed90cf49 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30491'; +$wp_version = '4.1-beta2-30492'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.