Prompt the user before leaving the Customizer if they have unsaved changes. props westonruter. fixes #25439.

git-svn-id: https://develop.svn.wordpress.org/trunk@29025 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi
2014-07-08 17:03:48 +00:00
parent 22147bfbfb
commit 0298f71032
4 changed files with 95 additions and 39 deletions

View File

@@ -382,6 +382,7 @@ function wp_default_scripts( &$scripts ) {
did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array(
'activate' => __( 'Save & Activate' ),
'save' => __( 'Save & Publish' ),
'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
'saved' => __( 'Saved' ),
'cancel' => __( 'Cancel' ),
'close' => __( 'Close' ),