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