diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 4bfc252..831a9e6 100644
|
|
|
|
| 1128 | 1128 | }); |
| 1129 | 1129 | }); |
| 1130 | 1130 | |
| | 1131 | // Prompt user with AYS dialog if leaving the Customizer with unsaved changes |
| | 1132 | $( window ).on( 'beforeunload', function () { |
| | 1133 | if ( ! api.state( 'saved' )() ) { |
| | 1134 | return api.l10n.saveAlert; |
| | 1135 | } |
| | 1136 | } ); |
| | 1137 | |
| 1131 | 1138 | // Pass events through to the parent. |
| 1132 | 1139 | api.bind( 'saved', function() { |
| 1133 | 1140 | parent.send( 'saved' ); |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index df42718..c0d42b6 100644
|
|
|
function wp_default_scripts( &$scripts ) { |
| 381 | 381 | did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array( |
| 382 | 382 | 'activate' => __( 'Save & Activate' ), |
| 383 | 383 | 'save' => __( 'Save & Publish' ), |
| | 384 | 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), |
| 384 | 385 | 'saved' => __( 'Saved' ), |
| 385 | 386 | 'cancel' => __( 'Cancel' ), |
| 386 | 387 | 'close' => __( 'Close' ), |