/** * Sanitize user input */ function _kc_sanitize_value($value, $type) { $value = kc_array_map_deep('trim', $value); if (!empty($value) && $type === 'multiinput') { $value = kc_array_remove_empty($value); $value = kc_array_rebuild_index($value); if (empty($value)) { $value = ''; } } return $value; }
public static function _admin_notices() { $notices = kc_array_remove_empty(self::$data['notices']); if (empty($notices)) { return; } foreach ($notices as $type => $messages) { foreach ($messages as $message) { if (empty($message)) { continue; } ?> <div class="<?php echo esc_attr($type); ?> "> <?php echo wpautop($message); ?> </div> <?php } } }