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

Filters the social template value for a given post type.

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

add_filter( 'wpseo_social_template_post_type', 'wp_kama_wpseo_social_template_post_type_filter', 10, 3 );

/**
 * Function for `wpseo_social_template_post_type` 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 $post_type            The name of the post type.
 *
 * @return string
 */
function wp_kama_wpseo_social_template_post_type_filter( $template, $template_option_name, $post_type ){

	// 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.
$post_type(строка)
The name of the post type.

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

WPSEO_Post_Metabox_Formatter::get_social_template()
wpseo_social_template_post_type
yoast/admin/formatter/class-post-metabox-formatter.php 278
return \apply_filters( 'wpseo_social_template_post_type', '', $template_option_name, $this->post->post_type );

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

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