wpseo_opengraph_image хук-фильтр . Yoast 1.0
Filter: 'wpseo_opengraph_image' - Allow changing the Open Graph image.
Использование
add_filter( 'wpseo_opengraph_image', 'filter_function_name_1159', 10, 2 ); function filter_function_name_1159( $image_url, $presentation ){ // filter... return $image_url; }
- $image_url(строка)
- The URL of the Open Graph image.
- $presentation(Indexable_Presentation)
- The presentation of an indexable.
Где вызывается хук
wpseo_opengraph_image
yoast/src/presenters/open-graph/image-presenter.php 84
$image_url = \trim( \apply_filters( 'wpseo_opengraph_image', $image['url'], $this->presentation ) );