WPSEO_Rank::from_numeric_score
Returns a rank for a specific numeric score.
Метод класса: WPSEO_Rank{}
Хуков нет.
Возвращает
self.
Использование
$result = WPSEO_Rank::from_numeric_score( $score );
- $score(int) (обязательный)
- The score to determine a rank for.
Код WPSEO_Rank::from_numeric_score() WPSEO Rank::from numeric score Yoast 27.6
public static function from_numeric_score( $score ) {
// Set up the default value.
$rank = new self( self::BAD );
foreach ( self::$ranges as $rank_index => $range ) {
if ( $range['start'] <= $score && $score <= $range['end'] ) {
$rank = new self( $rank_index );
break;
}
}
return $rank;
}