Define `JSON_PRETTY_PRINT` so it can be used with `wp_json_encode()`
* `JSON_PRETTY_PRINT` was introduced in PHP 5.4 * Now you can use it with lower PHP versions, without a notice fixes #30139 see #28786 Built from https://develop.svn.wordpress.org/trunk@30075 git-svn-id: http://core.svn.wordpress.org/trunk@30075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0f64edb657
commit
45afcde640
|
@ -123,3 +123,9 @@ function hash_equals( $a, $b ) {
|
||||||
return $result === 0;
|
return $result === 0;
|
||||||
}
|
}
|
||||||
endif;
|
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 );
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-alpha-30074';
|
$wp_version = '4.1-alpha-30075';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue