wpseo_social_template_taxonomy хук-фильтрYoast 1.0

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.

Где вызывается хук

WPSEO_Term_Metabox_Formatter::get_social_template()
wpseo_social_template_taxonomy
yoast/admin/formatter/class-term-metabox-formatter.php 244
return apply_filters( 'wpseo_social_template_taxonomy', '', $template_option_name, $this->term->taxonomy );

Где используется хук в Yoast SEO

Использование не найдено.