Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




stripslashes_deep [ WordPress Function ]

stripslashes_deep ( $value )
Parameters:
  • (array|string) $value The array or string to be stripped.
Returns:
  • (array|string) Stripped array (or string in the callback).
Defined at:



Navigates through an array and removes slashes from the values.

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.

Source


<?php
function stripslashes_deep($value) {
    if ( 
is_array($value) ) {
        
$value array_map('stripslashes_deep'$value);
    } elseif ( 
is_object($value) ) {
        
$vars get_object_vars$value );
        foreach (
$vars as $key=>$data) {
            
$value->{$key} = stripslashes_deep$data );
        }
    } else {
        
$value stripslashes($value);
    }

    return 
$value;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics