wpseo_tax_meta_special_term_id_validation_<term_id>

The Yoast SEO wpseo tax meta special term id validation hook.

Description

apply_filters( 'wpseo_tax_meta_special_term_id_validation_<term_id>', (unknown) $meta_data, (unknown) $taxonomy, (unknown) $term_id ); 

Parameters (3)

0. $meta_data (unknown)
The meta data.
1. $taxonomy (unknown)
The taxonomy.
2. $term_id (unknown)
The term id.

Usage

To run the hook, copy the example below.
  1. $meta_data = apply_filters( 'wpseo_tax_meta_special_term_id_validation_{$term_id}', $meta_data, $taxonomy, $term_id ); 
  2.  
  3. if ( !empty( $meta_data ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wpseo_tax_meta_special_term_id_validation_<term_id> callback 
  2. function filter_wpseo_tax_meta_special_term_id_validation_term_id( $meta_data, $taxonomy, $term_id ) { 
  3. // make filter magic happen here... 
  4. return $meta_data
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "wpseo_tax_meta_special_term_id_validation_{$term_id}", 'filter_wpseo_tax_meta_special_term_id_validation_term_id', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "wpseo_tax_meta_special_term_id_validation_{$term_id}", 'filter_wpseo_tax_meta_special_term_id_validation_term_id', 10, 3 ); 

Defined (2)

The filter is defined in the following location(s).

/inc/options/class-wpseo-taxonomy-meta.php  
  1. $clean[ $taxonomy ][ $term_id ] = apply_filters( 'wpseo_tax_meta_special_term_id_validation_' . $term_id, $meta_data, $taxonomy, $term_id ); 
  1. $clean[ $taxonomy ][ $term_id ] = apply_filters( 'wpseo_tax_meta_special_term_id_validation_' . $term_id, $meta_data, $taxonomy, $term_id );