Yoast\WP\SEO\Helpers
Score_Icon_Helper::for_readability()
Creates a Score_Icon_Presenter for the readability analysis.
Метод класса: Score_Icon_Helper{}
Хуков нет.
Возвращает
Score_Icon_Presenter
. The Score_Icon_Presenter.
Использование
$Score_Icon_Helper = new Score_Icon_Helper(); $Score_Icon_Helper->for_readability( $score, $extra_class );
- $score(int) (обязательный)
- The readability analysis score.
- $extra_class(строка)
- Any extra class.
По умолчанию: ''
Код Score_Icon_Helper::for_readability() Score Icon Helper::for readability Yoast 24.0
public function for_readability( $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_label(), $class ); }