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