| @@ -10,15 +10,13 @@ | ||
| 10 | 10 | class FrmCurrencyHelper { |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * @param string $currency |
| 14 | - * | |
| 15 | 14 | * @return array |
| 16 | 15 | */ |
| 17 | 16 | public static function get_currency( $currency ) { |
| 18 | 17 | $currency = strtoupper( $currency ); |
| 19 | 18 | $currencies = self::get_currencies(); |
| 20 | - | |
| 21 | 19 | if ( isset( $currencies[ $currency ] ) ) { |
| 22 | 20 | $currency = $currencies[ $currency ]; |
| 23 | 21 | } elseif ( isset( $currencies[ strtolower( $currency ) ] ) ) { |
| 24 | 22 | $currency = $currencies[ strtolower( $currency ) ]; |
| @@ -24,26 +22,12 @@ | ||
| 24 | 22 | $currency = $currencies[ strtolower( $currency ) ]; |
| 25 | 23 | } else { |
| 26 | 24 | $currency = $currencies['USD']; |
| 27 | 25 | } |
| 28 | - | |
| 29 | 26 | return $currency; |
| 30 | 27 | } |
| 31 | 28 | |
| 32 | 29 | /** |
| 33 | - * Checks if the given format is a valid currency format. | |
| 34 | - * | |
| 35 | - * @since 6.18 | |
| 36 | - * | |
| 37 | - * @param string $format_value The format value to check. | |
| 38 | - * | |
| 39 | - * @return bool | |
| 40 | - */ | |
| 41 | - public static function is_currency_format( $format_value ) { | |
| 42 | - return in_array( $format_value, array( 'currency', 'number' ), true ); | |
| 43 | - } | |
| 44 | - | |
| 45 | - /** | |
| 46 | 30 | * Get a list of all supported currencies. |
| 47 | 31 | * |
| 48 | 32 | * @since 6.5. |
| 49 | 33 | * |
| @@ -305,9 +289,9 @@ | ||
| 305 | 289 | ), |
| 306 | 290 | 'TRY' => array( |
| 307 | 291 | 'name' => __( 'Turkish Liras', 'formidable' ), |
| 308 | 292 | 'symbol_left' => '', |
| 309 | - 'symbol_right' => '₺', | |
| 293 | + 'symbol_right' => '€', | |
| 310 | 294 | 'symbol_padding' => ' ', |
| 311 | 295 | 'thousand_separator' => '.', |
| 312 | 296 | 'decimal_separator' => ',', |
| 313 | 297 | 'decimals' => 2, |
| @@ -341,9 +325,9 @@ | ||
| 341 | 325 | |
| 342 | 326 | if ( is_array( $filtered_currencies ) ) { |
| 343 | 327 | $currencies = $filtered_currencies; |
| 344 | 328 | } else { |
| 345 | - _doing_it_wrong( __METHOD__, 'Only arrays should be returned when using the frm_currencies filter.', '6.5' ); | |
| 329 | + _doing_it_wrong( __FUNCTION__, 'Only arrays should be returned when using the frm_currencies filter.', '6.5' ); | |
| 346 | 330 | } |
| 347 | 331 | |
| 348 | 332 | return $currencies; |
| 349 | 333 | } |