• 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_Taxonomy_Meta::set_value() – Setting a single value to the term meta.

You appear to be a bot. Output may be restricted

Description

Setting a single value to the term meta.

Usage

WPSEO_Taxonomy_Meta::set_value( $term_id, $taxonomy, $meta_key, $meta_value );

Parameters

$term_id
( int ) required – ID of the term to save data for.
$taxonomy
( string ) required – The taxonomy the term belongs to.
$meta_key
( string ) required – The target meta key to store the value in.
$meta_value
( string ) required – The value of the target meta key.

Returns

void

Source

File name: wordpress-seo/inc/options/class-wpseo-taxonomy-meta.php
Lines:

1 to 8 of 8
  public static function set_value( $term_id, $taxonomy, $meta_key, $meta_value ) {

    if ( substr( strtolower( $meta_key ), 0, 6 ) !== 'wpseo_' ) {
      $meta_key = 'wpseo_' . $meta_key;
    }

    self::set_values( $term_id, $taxonomy, [ $meta_key => $meta_value ] );
  }
 

 View on GitHub View on Trac

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

Primary Sidebar

Information

Function name: WPSEO_Taxonomy_Meta::set_value
Class ref: WPSEO_Taxonomy_Meta
Plugin ref: Yoast SEO
Version: 20.2.1
Sourcefile: inc/options/class-wpseo-taxonomy-meta.php
File ref: inc/options/class-wpseo-taxonomy-meta.php
Deprecated?: No
API Letters: M,S,T,V,W

Footer

Yoast SEO a2z
Yoast SEO a2z
WordPress SEO a2z
WordPress 6.1.1
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-2023. All rights reserved.


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

  • Home
  • Blog
  • Sitemap
  • Sites