Yoast\WP\SEO\Presenters\Twitter
Title_Presenter{} Yoast 1.0
Presenter class for the Twitter title.
Хуки из класса
Возвращает
Null. Ничего.
Использование
$Title_Presenter = new Title_Presenter(); // use class methods
Методы
- get()
- ERROR: no method name found on line ` * @param Indexable_Presentation $presentation The presentation of an indexable.`
- ERROR: no method name found on line ``
Код Title_Presenter{} Title Presenter{} Yoast 15.6.2
class Title_Presenter extends Abstract_Indexable_Tag_Presenter {
/**
* The tag format including placeholders.
*
* @var string
*/
protected $tag_format = '<meta name="twitter:title" content="%s" />';
/**
* Run the Twitter title through replace vars and the `wpseo_twitter_title` filter.
*
* @return string The filtered Twitter title.
*/
public function get() {
/**
* Filter: 'wpseo_twitter_title' - Allow changing the Twitter title.
*
* @api string $twitter_title The Twitter title.
*
* @param Indexable_Presentation $presentation The presentation of an indexable.
*/
return \trim( \apply_filters( 'wpseo_twitter_title', $this->replace_vars( $this->presentation->twitter_title ), $this->presentation ) );
}
}