Array_To_CSV.php
3 years ago
Currency.php
3 years ago
Device.php
2 years ago
Number_Formatter.php
3 years ago
Option.php
2 years ago
Request.php
2 years ago
Salt.php
3 years ago
Security.php
3 years ago
Singleton.php
2 years ago
String_Util.php
3 years ago
URL.php
3 years ago
WP_Async_Request.php
3 years ago
WordPress_Site_Date_Format_Pattern.php
3 years ago
Security.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP_SCOPED\IAWP\Utils; |
| 4 | |
| 5 | class Security |
| 6 | { |
| 7 | public static function json_encode($object) |
| 8 | { |
| 9 | return \json_encode($object, \JSON_HEX_QUOT | \JSON_HEX_TAG | \JSON_HEX_AMP | \JSON_HEX_APOS); |
| 10 | } |
| 11 | public static function string($string) |
| 12 | { |
| 13 | return \sanitize_text_field($string); |
| 14 | } |
| 15 | public static function attr($att) |
| 16 | { |
| 17 | return \esc_attr($att); |
| 18 | } |
| 19 | public static function hex($hex) |
| 20 | { |
| 21 | return \sanitize_hex_color($hex); |
| 22 | } |
| 23 | public static function html($html) |
| 24 | { |
| 25 | return \wp_kses_post($html); |
| 26 | } |
| 27 | public static function form($html) |
| 28 | { |
| 29 | return \wp_kses($html, ['div' => ['class' => [], 'style' => []], 'select' => ['class' => []], 'option' => ['class' => [], 'value' => [], 'data-datatype' => []], 'input' => ['class' => [], 'type' => [], 'data-css' => [], 'data-dow' => [], 'data-format' => [], 'readonly'], 'button' => ['class' => []], 'span' => ['class' => [], 'style' => []]]); |
| 30 | } |
| 31 | public static function svg($html) |
| 32 | { |
| 33 | return \wp_kses($html, ['svg' => ['height' => [], 'width' => [], 'fill' => [], 'viewbox' => [], 'style' => []], 'path' => ['d' => []]]); |
| 34 | } |
| 35 | } |
| 36 | \class_alias('IAWP_SCOPED\\IAWP\\Utils\\Security', 'IAWP\\Utils\\Security', \false); |
| 37 |