REST API: Make JS Client store schema in session storage.
Props adamsilverstein. Fixes #38895. Built from https://develop.svn.wordpress.org/trunk@39344 git-svn-id: http://core.svn.wordpress.org/trunk@39284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
14654d9539
commit
e20ded7e75
|
@ -1017,7 +1017,7 @@
|
|||
success: function( newSchemaModel ) {
|
||||
|
||||
// Store a copy of the schema model in the session cache if available.
|
||||
if ( ! _.isUndefined( sessionStorage ) && wpApiSettings.cacheSchema ) {
|
||||
if ( ! _.isUndefined( sessionStorage ) && ( _.isUndefined( wpApiSettings.cacheSchema ) || wpApiSettings.cacheSchema ) ) {
|
||||
try {
|
||||
sessionStorage.setItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ), JSON.stringify( newSchemaModel ) );
|
||||
} catch ( error ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta4-39343';
|
||||
$wp_version = '4.7-beta4-39344';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue