WPSEO_Replace_Vars::retrieve_sitedesc
Retrieve the site's tag line / description for use as replacement string.
The $replacement variable is static because it doesn't change depending on the context. See https://github.com/Yoast/wordpress-seo/pull/1172#issuecomment-46019482.
Метод класса: WPSEO_Replace_Vars{}
Хуков нет.
Возвращает
Строку|null.
Использование
// private - только в коде основоного (родительского) класса $result = $this->retrieve_sitedesc();
Код WPSEO_Replace_Vars::retrieve_sitedesc() WPSEO Replace Vars::retrieve sitedesc Yoast 27.4
private function retrieve_sitedesc() {
static $replacement;
if ( ! isset( $replacement ) ) {
$description = wp_strip_all_tags( get_bloginfo( 'description' ) );
if ( $description !== '' ) {
$replacement = $description;
}
}
return $replacement;
}