IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2871 | 2871 | * @return string|false The JSON encoded string, or false if it cannot be encoded. |
2872 | 2872 | */ |
2873 | 2873 | function wp_json_encode( $data, $options = 0, $depth = 512 ) { |
| 2874 | // Prepare the data for JSON serialization. |
| 2875 | $data = _wp_json_prepare_data( $data ); |
| 2876 | |
2874 | 2877 | /* |
2875 | 2878 | * json_encode() has had extra params added over the years. |
2876 | 2879 | * $options was added in 5.3, and $depth in 5.5. |
… |
… |
|
2884 | 2887 | $args = array( $data ); |
2885 | 2888 | } |
2886 | 2889 | |
2887 | | // Prepare the data for JSON serialization. |
2888 | | $args[0] = _wp_json_prepare_data( $data ); |
2889 | 2890 | |
2890 | 2891 | $json = @call_user_func_array( 'json_encode', $args ); |
2891 | 2892 | |
… |
… |
|
2897 | 2898 | } |
2898 | 2899 | |
2899 | 2900 | try { |
2900 | | $args[0] = _wp_json_sanity_check( $data, $depth ); |
| 2901 | $args[0] = _wp_json_sanity_check( $args[0], $depth ); |
2901 | 2902 | } catch ( Exception $e ) { |
2902 | 2903 | return false; |
2903 | 2904 | } |