WPSEO_Statistics_Service::labels()privateYoast 1.0

Determines the labels for the various scoring ranks that are known within Yoast SEO.

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

Хуков нет.

Возвращает

Массив. Array containing the translatable labels.

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

// private - только в коде основоного (родительского) класса
$result = $this->labels();

Код WPSEO_Statistics_Service::labels() Yoast 22.4

private function labels() {
	return [
		WPSEO_Rank::NO_FOCUS => sprintf(
			/* translators: %1$s expands to an opening strong tag, %2$s expands to a closing strong tag */
			__( 'Posts %1$swithout%2$s a focus keyphrase', 'wordpress-seo' ),
			'<strong>',
			'</strong>'
		),
		WPSEO_Rank::BAD      => sprintf(
			/* translators: %s expands to the score */
			__( 'Posts with the SEO score: %s', 'wordpress-seo' ),
			'<strong>' . __( 'Needs improvement', 'wordpress-seo' ) . '</strong>'
		),
		WPSEO_Rank::OK       => sprintf(
			/* translators: %s expands to the score */
			__( 'Posts with the SEO score: %s', 'wordpress-seo' ),
			'<strong>' . __( 'OK', 'wordpress-seo' ) . '</strong>'
		),
		WPSEO_Rank::GOOD     => sprintf(
			/* translators: %s expands to the score */
			__( 'Posts with the SEO score: %s', 'wordpress-seo' ),
			'<strong>' . __( 'Good', 'wordpress-seo' ) . '</strong>'
		),
		WPSEO_Rank::NO_INDEX => __( 'Posts that should not show up in search results', 'wordpress-seo' ),
	];
}