X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0461a5f2e55c8d5f1fde96ca2e83117152573c7d..88550bc3400cc7c035ff590ecb007c7938041ded:/wp-includes/compat.php 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 ); +}