wpseo_social_template_taxonomy
Filters the social template value for a given taxonomy.
Использование
add_filter( 'wpseo_social_template_taxonomy', 'wp_kama_wpseo_social_template_taxonomy_filter', 10, 3 );
/**
* Function for `wpseo_social_template_taxonomy` filter-hook.
*
* @param string $template The social template value.
* @param string $template_option_name The subname of the option in which the template you want to get is saved.
* @param string $taxonomy The name of the taxonomy.
*
* @return string
*/
function wp_kama_wpseo_social_template_taxonomy_filter( $template, $template_option_name, $taxonomy ){
// filter...
return $template;
}
- $template(строка)
- The social template value.
По умолчанию: empty string - $template_option_name(строка)
- The subname of the option in which the template you want to get is saved.
- $taxonomy(строка)
- The name of the taxonomy.
Где вызывается хук
yoast/src/editors/framework/seo/terms/social-data-provider.php 123
return \apply_filters( 'wpseo_social_template_taxonomy', '', $template_option_name, $this->term->taxonomy );