1 | <?php |
||
17 | class TGMPA_Utils { |
||
18 | /** |
||
19 | * Whether the PHP filter extension is enabled. |
||
20 | * |
||
21 | * @see http://php.net/book.filter |
||
22 | * |
||
23 | * @since 2.5.0 |
||
24 | * |
||
25 | * @static |
||
26 | * |
||
27 | * @var bool $has_filters True is the extension is enabled. |
||
28 | */ |
||
29 | public static $has_filters; |
||
30 | |||
31 | /** |
||
32 | * Wrap an arbitrary string in <em> tags. Meant to be used in combination with array_map(). |
||
33 | * |
||
34 | * @since 2.5.0 |
||
35 | * |
||
36 | * @static |
||
37 | * |
||
38 | * @param string $string Text to be wrapped. |
||
39 | * @return string |
||
40 | */ |
||
41 | public static function wrap_in_em( $string ) { |
||
44 | |||
45 | /** |
||
46 | * Wrap an arbitrary string in <strong> tags. Meant to be used in combination with array_map(). |
||
47 | * |
||
48 | * @since 2.5.0 |
||
49 | * |
||
50 | * @static |
||
51 | * |
||
52 | * @param string $string Text to be wrapped. |
||
53 | * @return string |
||
54 | */ |
||
55 | public static function wrap_in_strong( $string ) { |
||
58 | |||
59 | /** |
||
60 | * Helper function: Validate a value as boolean |
||
61 | * |
||
62 | * @since 2.5.0 |
||
63 | * |
||
64 | * @static |
||
65 | * |
||
66 | * @param mixed $value Arbitrary value. |
||
67 | * @return bool |
||
68 | */ |
||
69 | public static function validate_bool( $value ) { |
||
80 | |||
81 | /** |
||
82 | * Helper function: Cast a value to bool |
||
83 | * |
||
84 | * @since 2.5.0 |
||
85 | * |
||
86 | * @static |
||
87 | * |
||
88 | * @param mixed $value Value to cast. |
||
89 | * @return bool |
||
90 | */ |
||
91 | protected static function emulate_filter_bool( $value ) { |
||
128 | } // End of class TGMPA_Utils |
||
129 |