Core Function
View Source on Trac ↗ _wp_json_sanity_check()
_wp_json_sanity_check( mixed $value, mixed $depth ) Performs confidence checks on data that shall be encoded to JSON.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $value mixed | Variable (usually an array or object) to encode as JSON. Required |
| $depth int | Maximum depth to walk through $value. Must be greater than 0. Required |
Return Value
(mixed)
The sanitized data that shall be encoded to JSON.
Function Information
Since Version
4.1.0
Source File
wp-includes/functions.php
Advertisement