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

Filter: wpseo_opengraph_image_size Allow overriding the image size used for Open Graph sharing. If this filter is used, the defined size will always be used for the og:image. The image will still be rejected if it is too small.

Only use this filter if you manually want to determine the best image size for the og:image tag.

Use the wpseo_image_sizes if you want to use our logic. That filter can be used to add an image size that needs to be taken into consideration within our own logic.

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

add_filter( 'wpseo_opengraph_image_size', 'wp_kama_wpseo_opengraph_image_size_filter' );

/**
 * Function for `wpseo_opengraph_image_size` filter-hook.
 * 
 * @param string|false $size Size string.
 *
 * @return string|false
 */
function wp_kama_wpseo_opengraph_image_size_filter( $size ){

	// filter...
	return $size;
}
$size(строка|false)
Size string.

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

Image_Helper::get_override_image_size()
wpseo_opengraph_image_size
yoast/src/helpers/open-graph/image-helper.php 84
return \apply_filters( 'wpseo_opengraph_image_size', null );

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

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