stripslashes_deep

Navigates through an array, object, or scalar, and removes slashes from the values.

Description

(array|string) stripslashes_deep( (array|string) $value ); 

If an array is passed, the array_map() function causes a callback to pass the value back to the function. The slashes from this value will removed.

Returns (array|string)

Stripped array (or string in the callback).

Parameters (1)

0. $value (array|string)
The array or string to be striped.

Usage

  1. if ( !function_exists( 'stripslashes_deep' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/backpress/functions.formatting.php'; 
  3.  
  4. // The array or string to be striped. 
  5. $value = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = stripslashes_deep($value); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/backpress/functions.formatting.php  
  1. function stripslashes_deep($value) { 
  2. $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); 
  3. return $value;