wpseo_opengraph_desc хук-фильтр . Yoast 1.0
Filter: 'wpseo_opengraph_desc' - Allow changing the Yoast SEO generated Open Graph description.
Использование
add_filter( 'wpseo_opengraph_desc', 'filter_function_name_3958', 10, 2 ); function filter_function_name_3958( $replace_vars, $presentation ){ // filter... return $replace_vars; }
- $replace_vars(строка)
- The description.
- $presentation(Indexable_Presentation)
- The presentation of an indexable.
Где вызывается хук
yoast/src/presenters/open-graph/description-presenter.php 33
return \trim( \apply_filters( 'wpseo_opengraph_desc', $this->replace_vars( $this->presentation->open_graph_description ), $this->presentation ) );