Yoast\WP\SEO\open_graph_image_(object_type)
Allow changing the Open Graph image URL.
Использование
add_filter( 'Yoast\WP\SEO\open_graph_image_(object_type)', 'wp_kama_Yoast\WP\SEO\open_graph_image_object_type_filter', 10, 2 );
/**
* Function for `Yoast\WP\SEO\open_graph_image_(object_type)` filter-hook.
*
* @param string $image The default image URL.
* @param string $object_subtype The object subtype.
*
* @return string
*/
function wp_kama_Yoast\WP\SEO\open_graph_image_object_type_filter( $image, $object_subtype ){
// filter...
return $image;
}
- $image(строка)
- The default image URL.
- $object_subtype(строка)
- The object subtype.
Где вызывается хук
Yoast\WP\SEO\open_graph_image_(object_type)
yoast/src/helpers/open-graph/values-helper.php 83
return \apply_filters( 'Yoast\WP\SEO\open_graph_image_' . $object_type, $image, $object_subtype );