| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function format($input) |
||
| 27 | { |
||
| 28 | // in case an int or float etc was passed in |
||
| 29 | $input = (string) $input; |
||
| 30 | if (function_exists('iconv')) { |
||
| 31 | $input = iconv('utf-8', 'cp1252//TRANSLIT', $input); |
||
| 32 | } elseif (WP_DEBUG) { |
||
| 33 | trigger_error( |
||
| 34 | sprintf( |
||
| 35 | // @codingStandardsIgnoreStart |
||
| 36 | esc_html__( |
||
| 37 | '%1$s could not format the string "%2$s" because the function "%3$s" does not exist. Please verify PHP is installed with this function, see %4$s', |
||
| 38 | 'event_espresso' |
||
| 39 | ), |
||
| 40 | // @codingStandardsIgnoreEnd |
||
| 41 | get_class($this), |
||
| 42 | $input, |
||
| 43 | 'iconv', |
||
| 44 | '<a href="http://php.net/manual/en/iconv.installation.php">http://php.net/manual/en/iconv.installation.php</a>' |
||
| 45 | ) |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | return $input; |
||
| 49 | } |
||
| 50 | } |
||
| 51 |