• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Yoast SEO a2z

Yoast SEO a2z

WordPress SEO a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / wpseo_split_shared_term() – Makes sure the taxonomy meta is updated when a taxonomy term is split.

You appear to be a bot. Output may be restricted

Description

Makes sure the taxonomy meta is updated when a taxonomy term is split.

Usage

wpseo_split_shared_term( $old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy );

Parameters

$old_term_id
( string ) required – Old term id of the taxonomy term that was splitted.
$new_term_id
( string ) required – New term id of the taxonomy term that was splitted.
$term_taxonomy_id
( string ) required – Term taxonomy id for the taxonomy that was affected.
$taxonomy
( string ) required – The taxonomy that the taxonomy term was splitted for.

Returns

void

Source

File name: wordpress-seo/inc/wpseo-functions.php


Lines:

1 to 10 of 10
function wpseo_split_shared_term( $old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) {
  $tax_meta = get_option( 'wpseo_taxonomy_meta', array() );

  if ( ! empty( $tax_meta[ $taxonomy ][ $old_term_id ] ) ) {
    $tax_meta[ $taxonomy ][ $new_term_id ] = $tax_meta[ $taxonomy ][ $old_term_id ];
    unset( $tax_meta[ $taxonomy ][ $old_term_id ] );
    update_option( 'wpseo_taxonomy_meta', $tax_meta );
  }
}
 

 View on GitHub View on Trac

Published: 27th November 2019 | Last updated: 27th November 2019

Primary Sidebar

Information

Function name: wpseo_split_shared_term
Plugin ref: Yoast SEO
Version: 12.6.2
Sourcefile: inc/wpseo-functions.php
File ref: inc/wpseo-functions.php
Deprecated?: No
API Letters: S,T,W

Footer

Yoast SEO a2z Yoast SEO a2z
WordPress SEO a2z
WordPress 5.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wordpress-seo.wp-a2z.org
© Copyright Yoast SEO a2z 2017-2019. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites