diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 9f385a003..0664dfd42 100644
|
|
|
4359 | 4359 | * |
4360 | 4360 | * @param {object} [args] Args. |
4361 | 4361 | * @param {string} [args.status=publish] Status. |
| 4362 | * @param {bool} [args.skipRevision=true] Store Revision. |
4362 | 4363 | * @param {string} [args.date] Date, in local time in MySQL format. |
4363 | 4364 | * @param {string} [args.title] Title |
4364 | 4365 | * @returns {jQuery.promise} Promise. |
… |
… |
|
4372 | 4373 | submit, |
4373 | 4374 | modifiedWhileSaving = {}, |
4374 | 4375 | invalidSettings = [], |
4375 | | invalidControls; |
| 4376 | invalidControls, |
| 4377 | skipRevision = false; |
4376 | 4378 | |
4377 | 4379 | if ( args && args.status ) { |
4378 | 4380 | changesetStatus = args.status; |
4379 | 4381 | } |
4380 | 4382 | |
| 4383 | if ( args && args.skipRevision ) { |
| 4384 | skipRevision = args.skipRevision; |
| 4385 | } |
| 4386 | |
4381 | 4387 | if ( api.state( 'saving' ).get() ) { |
4382 | 4388 | deferred.reject( 'already_saving' ); |
4383 | 4389 | deferred.promise(); |
… |
… |
|
4426 | 4432 | */ |
4427 | 4433 | query = $.extend( previewer.query( { excludeCustomizedSaved: false } ), { |
4428 | 4434 | nonce: previewer.nonce.save, |
4429 | | customize_changeset_status: changesetStatus |
| 4435 | customize_changeset_status: changesetStatus, |
| 4436 | skip_revision: skipRevision |
4430 | 4437 | } ); |
4431 | 4438 | if ( args && args.date ) { |
4432 | 4439 | query.customize_changeset_date = args.date; |
diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 4ac25232f..49e7607a1 100644
|
|
final class WP_Customize_Manager { |
2139 | 2139 | } |
2140 | 2140 | } |
2141 | 2141 | |
| 2142 | $skip_revision = false; |
| 2143 | if ( isset( $_POST['skip_revision'] ) ) { |
| 2144 | $skip_revision = filter_var( $_POST['skip_revision'], FILTER_VALIDATE_BOOLEAN ); |
| 2145 | } |
| 2146 | |
2142 | 2147 | $r = $this->save_changeset_post( array( |
2143 | 2148 | 'status' => $changeset_status, |
2144 | 2149 | 'title' => $changeset_title, |
2145 | 2150 | 'date_gmt' => $changeset_date_gmt, |
2146 | 2151 | 'data' => $input_changeset_data, |
| 2152 | 'skip_revision' => $skip_revision, |
2147 | 2153 | ) ); |
2148 | 2154 | if ( is_wp_error( $r ) ) { |
2149 | 2155 | $response = array( |
… |
… |
final class WP_Customize_Manager { |
2208 | 2214 | * @type string $date_gmt Date in GMT. Optional. |
2209 | 2215 | * @type int $user_id ID for user who is saving the changeset. Optional, defaults to the current user ID. |
2210 | 2216 | * @type bool $starter_content Whether the data is starter content. If false (default), then $starter_content will be cleared for any $data being saved. |
| 2217 | * @type bool $skip_revision Skip revision, default to false, Optional. |
2211 | 2218 | * } |
2212 | 2219 | * |
2213 | 2220 | * @return array|WP_Error Returns array on success and WP_Error with array data on error. |
… |
… |
final class WP_Customize_Manager { |
2222 | 2229 | 'date_gmt' => null, |
2223 | 2230 | 'user_id' => get_current_user_id(), |
2224 | 2231 | 'starter_content' => false, |
| 2232 | 'skip_revision' => false, |
2225 | 2233 | ), |
2226 | 2234 | $args |
2227 | 2235 | ); |
… |
… |
final class WP_Customize_Manager { |
2268 | 2276 | |
2269 | 2277 | // The request was made via wp.customize.previewer.save(). |
2270 | 2278 | $update_transactionally = (bool) $args['status']; |
2271 | | $allow_revision = (bool) $args['status']; |
| 2279 | $allow_revision = (bool) $args['skip_revision']; |
2272 | 2280 | |
2273 | 2281 | // Amend post values with any supplied data. |
2274 | 2282 | foreach ( $args['data'] as $setting_id => $setting_params ) { |