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

Filter: wpseo_opengraph_show_publish_date Allow showing publication date for other post types.

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

add_filter( 'wpseo_opengraph_show_publish_date', 'wp_kama_wpseo_opengraph_show_publish_date_filter', 10, 2 );

/**
 * Function for `wpseo_opengraph_show_publish_date` filter-hook.
 * 
 * @param bool   $show      Whether or not to show publish date.
 * @param string $post_type The current URL's post type.
 *
 * @return bool
 */
function wp_kama_wpseo_opengraph_show_publish_date_filter( $show, $post_type ){

	// filter...
	return $show;
}
$show(true|false)
Whether or not to show publish date.
$post_type(строка)
The current URL's post type.

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

Indexable_Post_Type_Presentation::generate_open_graph_article_published_time()
wpseo_opengraph_show_publish_date
yoast/src/presentations/indexable-post-type-presentation.php 274
if ( ! \apply_filters( 'wpseo_opengraph_show_publish_date', false, $this->post->get_post_type( $this->source ) ) ) {

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

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