Yoast\WP\SEO\Services\Health_Check

Report_Builder::get_badge_color()privateYoast 1.0

Generates the color for the badge using the current status.

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

Хуков нет.

Возвращает

Строку. The color for the badge's outline.

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

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

Код Report_Builder::get_badge_color() Yoast 22.4

private function get_badge_color() {
	if ( $this->status === self::STATUS_CRITICAL || $this->status === self::STATUS_RECOMMENDED ) {
		return 'red';
	}

	return 'blue';
}