|
@@ 62-68 (lines=7) @@
|
| 59 |
|
function numbers_of_players( $game_id, $players_min_max, $output ) { |
| 60 |
|
|
| 61 |
|
// Deal with max number of players matching min number of players. |
| 62 |
|
if ( absint( $players_min_max['min'] ) === absint( $players_min_max['max'] ) ) { |
| 63 |
|
return esc_attr( sprintf( |
| 64 |
|
// Translators: %d is the number of players. |
| 65 |
|
_n( '%d player', '%d players', absint( $players_min_max['min'] ), 'games-collector' ), |
| 66 |
|
absint( $players_min_max['min'] ) |
| 67 |
|
) ); |
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
// Deal with indeterminate or large number of max players. |
| 71 |
|
if ( 0 === absint( $players_min_max['max'] ) || 20 <= absint( $players_min_max['max'] ) ) { |
|
@@ 71-77 (lines=7) @@
|
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
// Deal with indeterminate or large number of max players. |
| 71 |
|
if ( 0 === absint( $players_min_max['max'] ) || 20 <= absint( $players_min_max['max'] ) ) { |
| 72 |
|
return esc_attr( sprintf( |
| 73 |
|
// Translators: %d is the minimum number players. |
| 74 |
|
__( '%d+ players', 'games-collector' ), |
| 75 |
|
absint( $players_min_max['min'] ) |
| 76 |
|
) ); |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
return $output; |
| 80 |
|
} |