mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@41869 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -589,6 +589,9 @@
|
||||
data.customize_changeset_autosave = 'true';
|
||||
}
|
||||
|
||||
// Allow plugins to modify the params included with the save request.
|
||||
api.trigger( 'save-request-params', data );
|
||||
|
||||
request = wp.ajax.post( 'customize_save', data );
|
||||
|
||||
request.done( function requestChangesetUpdateDone( data ) {
|
||||
@@ -7180,6 +7183,9 @@
|
||||
query.customize_changeset_title = args.title;
|
||||
}
|
||||
|
||||
// Allow plugins to modify the params included with the save request.
|
||||
api.trigger( 'save-request-params', query );
|
||||
|
||||
/*
|
||||
* Note that the dirty customized values will have already been set in the
|
||||
* changeset and so technically query.customized could be deleted. However,
|
||||
|
||||
Reference in New Issue
Block a user