Changeset 33611 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 08/12/2015 02:06:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r33238 r33611 4397 4397 4398 4398 /** 4399 * If the term being split is a nav_menu, change associations. 4400 * 4401 * @ignore 4402 * @since 4.3.0 4403 * 4404 * @global wpdb $wpdb 4405 * 4406 * @param int $term_id ID of the formerly shared term. 4407 * @param int $new_term_id ID of the new term created for the $term_taxonomy_id. 4408 * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split. 4409 * @param string $taxonomy Taxonomy for the split term. 4410 */ 4411 function _wp_check_split_nav_menu_terms( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) { 4412 if ( 'nav_menu' !== $taxonomy ) { 4413 return; 4414 } 4415 4416 // Update menu locations. 4417 $locations = get_nav_menu_locations(); 4418 foreach ( $locations as $location => $menu_id ) { 4419 if ( $term_id == $menu_id ) { 4420 $locations[ $location ] = $new_term_id; 4421 } 4422 } 4423 set_theme_mod( 'nav_menu_locations', $locations ); 4424 } 4425 4426 /** 4399 4427 * Get data about terms that previously shared a single term_id, but have since been split. 4400 4428 *
Note: See TracChangeset
for help on using the changeset viewer.