Make WordPress Core

Changeset 41869


Ignore:
Timestamp:
10/15/2017 10:42:00 PM (7 years ago)
Author:
westonruter
Message:

Customize: Add 'save-request-params' event on wp.customize for plugins to inject/modify params in save requests.

Allows feature plugins, for example, to supply a customize_changeset_title param instead of having to wrap wp.customize.previewer.query.

Props dlh.
Fixes #42206.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-controls.js

    r41860 r41869  
    589589            data.customize_changeset_autosave = 'true';
    590590        }
     591
     592        // Allow plugins to modify the params included with the save request.
     593        api.trigger( 'save-request-params', data );
    591594
    592595        request = wp.ajax.post( 'customize_save', data );
     
    71817184                    }
    71827185
     7186                    // Allow plugins to modify the params included with the save request.
     7187                    api.trigger( 'save-request-params', query );
     7188
    71837189                    /*
    71847190                     * Note that the dirty customized values will have already been set in the
Note: See TracChangeset for help on using the changeset viewer.