helper.php
4 years ago
share-style-settings.php
4 years ago
social-share-style.php
4 years ago
user-helper.php
4 years ago
view-helper.php
4 years ago
helper.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WP_Social\Helper; |
| 4 | |
| 5 | defined('ABSPATH') || exit; |
| 6 | |
| 7 | class Helper { |
| 8 | |
| 9 | public static function is_true($val1, $val2, $print) { |
| 10 | return esc_attr($val1 === $val2 ? $print : ''); |
| 11 | } |
| 12 | |
| 13 | public static function sanitize_white_list($val, $def, $white_list) { |
| 14 | |
| 15 | if(in_array($val, $white_list)) { |
| 16 | |
| 17 | return $val; |
| 18 | } |
| 19 | |
| 20 | return $def; |
| 21 | } |
| 22 | |
| 23 | } |
| 24 |