Make WordPress Core

Changeset 39344


Ignore:
Timestamp:
11/23/2016 02:54:24 AM (8 years ago)
Author:
joehoyle
Message:

REST API: Make JS Client store schema in session storage.

Props adamsilverstein.
Fixes #38895.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wp-api.js

    r39051 r39344  
    10181018
    10191019                        // Store a copy of the schema model in the session cache if available.
    1020                         if ( ! _.isUndefined( sessionStorage ) && wpApiSettings.cacheSchema ) {
     1020                        if ( ! _.isUndefined( sessionStorage ) && ( _.isUndefined( wpApiSettings.cacheSchema ) || wpApiSettings.cacheSchema ) ) {
    10211021                            try {
    10221022                                sessionStorage.setItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ), JSON.stringify( newSchemaModel ) );
Note: See TracChangeset for help on using the changeset viewer.