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

Filter: wpseo_opengraph_image Allow changing the Open Graph image.

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

add_filter( 'wpseo_opengraph_image', 'wp_kama_wpseo_opengraph_image_filter', 10, 2 );

/**
 * Function for `wpseo_opengraph_image` filter-hook.
 * 
 * @param string                 $image_url    The URL of the Open Graph image.
 * @param Indexable_Presentation $presentation The presentation of an indexable.
 *
 * @return string
 */
function wp_kama_wpseo_opengraph_image_filter( $image_url, $presentation ){

	// filter...
	return $image_url;
}
$image_url(строка)
The URL of the Open Graph image.
$presentation(Indexable_Presentation)
The presentation of an indexable.

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

Image_Presenter::filter()
wpseo_opengraph_image
yoast/src/presenters/open-graph/image-presenter.php 103
$image_url = \trim( \apply_filters( 'wpseo_opengraph_image', $image['url'], $this->presentation ) );

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

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