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