Created
May 19, 2015 15:26
-
-
Save nicoladj77/932b8da25b87ad2d9dd9 to your computer and use it in GitHub Desktop.
Possible split term
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bugs_update_content_split_terms( $old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) { | |
$term_meta = get_option( 'taxonomy_' . $old_term_id ); | |
if ( 'espn_bug' === $taxonomy && $term_meta ) { | |
// We have a match, so we swap out the old tag ID for the new one and resave the option. | |
update_option( 'taxonomy_' . $new_term_id, $term_meta ); | |
} | |
} | |
add_action( 'split_shared_term', 'bugs_update_content_split_terms', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment