Yoast\WP\SEO\Presenters

Meta_Description_Presenter::get()publicYoast 1.0

Run the meta description content through replace vars, the wpseo_metadesc and sanitization.

Метод класса: Meta_Description_Presenter{}

Хуки из метода

Возвращает

Строку. The filtered meta description.

Использование

$Meta_Description_Presenter = new Meta_Description_Presenter();
$Meta_Description_Presenter->get();

Код Meta_Description_Presenter::get() Yoast 22.4

public function get() {
	$meta_description = $this->replace_vars( $this->presentation->meta_description );

	/**
	 * Filter: 'wpseo_metadesc' - Allow changing the Yoast SEO meta description sentence.
	 *
	 * @param string                 $meta_description The description sentence.
	 * @param Indexable_Presentation $presentation     The presentation of an indexable.
	 */
	$meta_description = \apply_filters( 'wpseo_metadesc', $meta_description, $this->presentation );
	$meta_description = $this->helpers->string->strip_all_tags( \stripslashes( $meta_description ) );
	return \trim( $meta_description );
}