diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php index 83a8c64652..ab4045250a 100644 --- a/src/wp-includes/compat.php +++ b/src/wp-includes/compat.php @@ -122,4 +122,10 @@ function hash_equals( $a, $b ) { return $result === 0; } -endif; \ No newline at end of file +endif; + +// JSON_PRETTY_PRINT was introduced in PHP 5.4 +// Defined here to prevent a notice when using it with wp_json_encode() +if ( ! defined( 'JSON_PRETTY_PRINT' ) ) { + define( 'JSON_PRETTY_PRINT', 128 ); +}