add_magic_quotes()
add_magic_quotes( array $array ) 在清理内容时遍历数组。Walks the a…
add_magic_quotes( array $array )
在清理内容时遍历数组。
Walks the array while sanitizing the contents.
在清理内容时遍历数组。
Walks the array while sanitizing the contents.
目录锚点:#参数#返回#源码
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| $array | (array) | 必需 | 清理内容时要行走的数组。 |
返回(Return)
(array)清理了$array。
源码(Source)
/**
* Walks the array while sanitizing the contents.
*
* @since 0.71
*
* @param array $array Array to walk while sanitizing contents.
* @return array Sanitized $array.
*/
function add_magic_quotes( $array ) {
foreach ( (array) $array as $k => $v ) {
if ( is_array( $v ) ) {
$array[$k] = add_magic_quotes( $v );
} else {
$array[$k] = addslashes( $v );
}
}
return $array;
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 0.71 | wp-includes/functions.php:1220 | 4 | 1 function |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!