X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/245e789b234afa4525862e7a6e5e3c2e7a52ef20..caeaf8dc94b5e3f75dc98ec92dc7b76049cdddb6:/wp-includes/compat.php?ds=sidebyside diff --git a/wp-includes/compat.php b/wp-includes/compat.php index 83a8c646..ab404525 100644 --- a/wp-includes/compat.php +++ b/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 ); +}