rebase on oct-10-2023
This commit is contained in:
@@ -222,6 +222,33 @@ class WPSEO_Rank {
|
||||
return $labels[ $this->rank ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the drop down labels for the inclusive language score.
|
||||
*
|
||||
* @return string The inclusive language rank label.
|
||||
*/
|
||||
public function get_drop_down_inclusive_language_labels() {
|
||||
$labels = [
|
||||
self::BAD => sprintf(
|
||||
/* translators: %s expands to the inclusive language score */
|
||||
__( 'Inclusive language: %s', 'wordpress-seo' ),
|
||||
__( 'Needs improvement', 'wordpress-seo' )
|
||||
),
|
||||
self::OK => sprintf(
|
||||
/* translators: %s expands to the inclusive language score */
|
||||
__( 'Inclusive language: %s', 'wordpress-seo' ),
|
||||
__( 'Potentially non-inclusive', 'wordpress-seo' )
|
||||
),
|
||||
self::GOOD => sprintf(
|
||||
/* translators: %s expands to the inclusive language score */
|
||||
__( 'Inclusive language: %s', 'wordpress-seo' ),
|
||||
__( 'Good', 'wordpress-seo' )
|
||||
),
|
||||
];
|
||||
|
||||
return $labels[ $this->rank ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the starting score for this rank.
|
||||
*
|
||||
@@ -289,6 +316,15 @@ class WPSEO_Rank {
|
||||
return array_map( [ 'WPSEO_Rank', 'create_rank' ], [ self::BAD, self::OK, self::GOOD ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all possible Inclusive Language Ranks.
|
||||
*
|
||||
* @return WPSEO_Rank[]
|
||||
*/
|
||||
public static function get_all_inclusive_language_ranks() {
|
||||
return array_map( [ 'WPSEO_Rank', 'create_rank' ], [ self::BAD, self::OK, self::GOOD ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a numeric rank into a WPSEO_Rank object, for use in functional array_* functions.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user