X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7f1521bf193b382565eb753043c161f4cb3fcda7..9441756a895fb4fdc4bcf20e0d228cef622663ca:/wp-includes/js/customize-loader.js diff --git a/wp-includes/js/customize-loader.js b/wp-includes/js/customize-loader.js index ce69a359..f853f37d 100644 --- a/wp-includes/js/customize-loader.js +++ b/wp-includes/js/customize-loader.js @@ -1,4 +1,8 @@ /* global _wpCustomizeLoaderSettings, confirm */ +/* + * Expose a public API that allows the customizer to be + * loaded on any page. + */ window.wp = window.wp || {}; (function( exports, $ ){ @@ -111,7 +115,11 @@ window.wp = window.wp || {}; this.active = true; this.body.addClass('customize-loading'); - // Dirty state of Customizer in iframe + /* + * Track the dirtiness state (whether the drafted changes have been published) + * of the Customizer in the iframe. This is used to decide whether to display + * an AYS alert if the user tries to close the window before saving changes. + */ this.saved = new api.Value( true ); this.iframe = $( '