IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 92 | 92 | define( 'SCRIPT_DEBUG', $develop_src ); |
| 93 | 93 | } |
| 94 | 94 | |
| | 95 | // Add define( 'WP_DEBUG_REST_API', true ); to wp-config.php to enable pretty JSON in the REST API during development. |
| | 96 | if ( ! defined( 'WP_DEBUG_REST_API' ) ) |
| | 97 | define( 'WP_DEBUG_REST_API', false ); |
| | 98 | |
| 95 | 99 | /** |
| 96 | 100 | * Private |
| 97 | 101 | */ |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 393 | 393 | */ |
| 394 | 394 | $result = apply_filters( 'rest_pre_echo_response', $result, $this, $request ); |
| 395 | 395 | |
| 396 | | $result = wp_json_encode( $result ); |
| | 396 | $options = ( defined( 'WP_DEBUG_REST_API' ) && WP_DEBUG_REST_API ) ? JSON_PRETTY_PRINT : 0; |
| | 397 | |
| | 398 | $result = wp_json_encode( $result, $options ); |
| 397 | 399 | |
| 398 | 400 | $json_error_message = $this->get_json_last_error(); |
| 399 | 401 | if ( $json_error_message ) { |