mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 18:37:58 +01: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. Built from https://develop.svn.wordpress.org/trunk@41869 git-svn-id: http://core.svn.wordpress.org/trunk@41703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
12f647679b
commit
2e184426c0
@ -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,
|
||||
|
8
wp-admin/js/customize-controls.min.js
vendored
8
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-beta2-41868';
|
||||
$wp_version = '4.9-beta2-41869';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user