diff --git a/inc/wp-helper-functions.php b/inc/wp-helper-functions.php index c8f4163..fe27584 100644 --- a/inc/wp-helper-functions.php +++ b/inc/wp-helper-functions.php @@ -108,3 +108,12 @@ function wp_validate_boolean($var) } } +if ( ! function_exists('wp_slash')) { + function wp_slash($value) + { + if (is_array($value)) { + return array_map('wp_slash', $value); + } + return is_string($value) ? addslashes($value) : $value; + } +}