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