wpseo_opengraph_image_height
Filter: wpseo_opengraph_image_height Allow changing the Open Graph image height.
Использование
add_filter( 'wpseo_opengraph_image_height', 'wp_kama_wpseo_opengraph_image_height_filter', 10, 2 ); /** * Function for `wpseo_opengraph_image_height` filter-hook. * * @param int $image_height The height of the Open Graph image. * @param Indexable_Presentation $presentation The presentation of an indexable. * * @return int */ function wp_kama_wpseo_opengraph_image_height_filter( $image_height, $presentation ){ // filter... return $image_height; }
- $image_height(int)
- The height of the Open Graph image.
- $presentation(Indexable_Presentation)
- The presentation of an indexable.
Где вызывается хук
wpseo_opengraph_image_height
yoast/src/presenters/open-graph/image-presenter.php 138
$image_height = (int) \apply_filters( 'wpseo_opengraph_image_height', $image_height, $this->presentation );