Yoast\WP\SEO\Helpers

Score_Icon_Helper::for_inclusive_language()publicYoast 1.0

Creates a Score_Icon_Presenter for the inclusive language analysis.

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

Хуков нет.

Возвращает

Score_Icon_Presenter. The Score_Icon_Presenter.

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

$Score_Icon_Helper = new Score_Icon_Helper();
$Score_Icon_Helper->for_inclusive_language( $score, $extra_class );
$score(int) (обязательный)
The inclusive language analysis score.
$extra_class(строка)
Any extra class.
По умолчанию: ''

Код Score_Icon_Helper::for_inclusive_language() Yoast 23.4

public function for_inclusive_language( $score, $extra_class = '' ) {
	$rank  = WPSEO_Rank::from_numeric_score( (int) $score );
	$class = $rank->get_css_class();
	if ( $extra_class ) {
		$class .= " $extra_class";
	}

	return new Score_Icon_Presenter( $rank->get_inclusive_language_label(), $class );
}