From 022ee8ec365c134526468eb846279c4d7a9febb0 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 26 Oct 2016 22:38:33 +0000 Subject: [PATCH] Customize: Remove unnecessary code for edit shortcuts which is no longer required due to moving buttons inside of partial placement containers. Props sirbrillig. Amends [38967]. See #27403. Built from https://develop.svn.wordpress.org/trunk@38972 git-svn-id: http://core.svn.wordpress.org/trunk@38915 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/css/customize-preview-rtl.css | 5 -- wp-includes/css/customize-preview-rtl.min.css | 2 +- wp-includes/css/customize-preview.css | 5 -- wp-includes/css/customize-preview.min.css | 2 +- wp-includes/js/customize-selective-refresh.js | 50 ------------------- .../js/customize-selective-refresh.min.js | 2 +- wp-includes/version.php | 2 +- 7 files changed, 4 insertions(+), 64 deletions(-) diff --git a/wp-includes/css/customize-preview-rtl.css b/wp-includes/css/customize-preview-rtl.css index 61e9da8020..28fb13e124 100644 --- a/wp-includes/css/customize-preview-rtl.css +++ b/wp-includes/css/customize-preview-rtl.css @@ -92,11 +92,6 @@ body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:bef visibility: hidden; } -.widget button.customize-partial-edit-shortcut-absolute, -.customize-partial-edit-shortcut-absolute { - position: static; -} - .customize-partial-edit-shortcut-left-margin:before { right: 0; } diff --git a/wp-includes/css/customize-preview-rtl.min.css b/wp-includes/css/customize-preview-rtl.min.css index 0e45f73916..8908285dae 100644 --- a/wp-includes/css/customize-preview-rtl.min.css +++ b/wp-includes/css/customize-preview-rtl.min.css @@ -1 +1 @@ -.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}.customize-partial-edit-shortcut,.widget button.customize-partial-edit-shortcut{position:relative;float:right;width:1px;height:1px;padding:0;margin:-1px -1px 0 0;border:0;background:0 0;color:transparent;box-shadow:none;outline:0;z-index:5}.customize-partial-edit-shortcut:active{padding:0;border:0}.customize-partial-edit-shortcut:before{position:absolute;right:-36px;color:#fff;width:30px;height:30px;font-size:18px;font-family:dashicons;content:'\f464';z-index:5;background-color:#0085ba;border-radius:50%;border:2px solid #fff;box-shadow:0 2px 1px rgba(46,68,83,.15);text-align:center;display:flex;flex-direction:row;justify-content:center;align-items:center;cursor:pointer;padding:0;animation-fill-mode:both;animation-duration:.4s;opacity:0;pointer-events:none;text-shadow:0 -1px 1px #006799,-1px 0 1px #006799,0 1px 1px #006799,1px 0 1px #006799}.customize-partial-edit-shortcut:focus:before,.customize-partial-edit-shortcut:hover:before{background:#008ec2;border-color:#191e23}body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut:before{animation-name:customize-partial-edit-shortcut-bounce-appear;pointer-events:auto}body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut:before{animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:before{animation-duration:1.5s;animation-delay:.4s;animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}.customize-partial-edit-shortcut-hidden:before,.page-sidebar-collapsed .customize-partial-edit-shortcut:before{visibility:hidden}.customize-partial-edit-shortcut-absolute,.widget button.customize-partial-edit-shortcut-absolute{position:static}.customize-partial-edit-shortcut-left-margin:before{right:0}@keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:scale3d(.3,.3,.3)}20%{transform:scale3d(1.1,1.1,1.1)}40%{transform:scale3d(.9,.9,.9)}60%{opacity:1;transform:scale3d(1.03,1.03,1.03)}80%{transform:scale3d(.97,.97,.97)}to{opacity:1;transform:scale3d(1,1,1)}}@keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:1;transform:scale3d(1,1,1)}20%{transform:scale3d(.97,.97,.97)}40%{opacity:1;transform:scale3d(1.03,1.03,1.03)}60%{transform:scale3d(.9,.9,.9)}80%{transform:scale3d(1.1,1.1,1.1)}to{opacity:0;transform:scale3d(.3,.3,.3)}}@media screen and (max-width:800px){.customize-partial-edit-shortcut:before{right:-18px}} \ No newline at end of file +.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}.customize-partial-edit-shortcut,.widget button.customize-partial-edit-shortcut{position:relative;float:right;width:1px;height:1px;padding:0;margin:-1px -1px 0 0;border:0;background:0 0;color:transparent;box-shadow:none;outline:0;z-index:5}.customize-partial-edit-shortcut:active{padding:0;border:0}.customize-partial-edit-shortcut:before{position:absolute;right:-36px;color:#fff;width:30px;height:30px;font-size:18px;font-family:dashicons;content:'\f464';z-index:5;background-color:#0085ba;border-radius:50%;border:2px solid #fff;box-shadow:0 2px 1px rgba(46,68,83,.15);text-align:center;display:flex;flex-direction:row;justify-content:center;align-items:center;cursor:pointer;padding:0;animation-fill-mode:both;animation-duration:.4s;opacity:0;pointer-events:none;text-shadow:0 -1px 1px #006799,-1px 0 1px #006799,0 1px 1px #006799,1px 0 1px #006799}.customize-partial-edit-shortcut:focus:before,.customize-partial-edit-shortcut:hover:before{background:#008ec2;border-color:#191e23}body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut:before{animation-name:customize-partial-edit-shortcut-bounce-appear;pointer-events:auto}body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut:before{animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:before{animation-duration:1.5s;animation-delay:.4s;animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}.customize-partial-edit-shortcut-hidden:before,.page-sidebar-collapsed .customize-partial-edit-shortcut:before{visibility:hidden}.customize-partial-edit-shortcut-left-margin:before{right:0}@keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:scale3d(.3,.3,.3)}20%{transform:scale3d(1.1,1.1,1.1)}40%{transform:scale3d(.9,.9,.9)}60%{opacity:1;transform:scale3d(1.03,1.03,1.03)}80%{transform:scale3d(.97,.97,.97)}to{opacity:1;transform:scale3d(1,1,1)}}@keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:1;transform:scale3d(1,1,1)}20%{transform:scale3d(.97,.97,.97)}40%{opacity:1;transform:scale3d(1.03,1.03,1.03)}60%{transform:scale3d(.9,.9,.9)}80%{transform:scale3d(1.1,1.1,1.1)}to{opacity:0;transform:scale3d(.3,.3,.3)}}@media screen and (max-width:800px){.customize-partial-edit-shortcut:before{right:-18px}} \ No newline at end of file diff --git a/wp-includes/css/customize-preview.css b/wp-includes/css/customize-preview.css index 7ce4fce8c3..a388488769 100644 --- a/wp-includes/css/customize-preview.css +++ b/wp-includes/css/customize-preview.css @@ -92,11 +92,6 @@ body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:bef visibility: hidden; } -.widget button.customize-partial-edit-shortcut-absolute, -.customize-partial-edit-shortcut-absolute { - position: static; -} - .customize-partial-edit-shortcut-left-margin:before { left: 0; } diff --git a/wp-includes/css/customize-preview.min.css b/wp-includes/css/customize-preview.min.css index 03b750ea83..7727db0fc9 100644 --- a/wp-includes/css/customize-preview.min.css +++ b/wp-includes/css/customize-preview.min.css @@ -1 +1 @@ -.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}.customize-partial-edit-shortcut,.widget button.customize-partial-edit-shortcut{position:relative;float:left;width:1px;height:1px;padding:0;margin:-1px 0 0 -1px;border:0;background:0 0;color:transparent;box-shadow:none;outline:0;z-index:5}.customize-partial-edit-shortcut:active{padding:0;border:0}.customize-partial-edit-shortcut:before{position:absolute;left:-36px;color:#fff;width:30px;height:30px;font-size:18px;font-family:dashicons;content:'\f464';z-index:5;background-color:#0085ba;border-radius:50%;border:2px solid #fff;box-shadow:0 2px 1px rgba(46,68,83,.15);text-align:center;display:flex;flex-direction:row;justify-content:center;align-items:center;cursor:pointer;padding:0;animation-fill-mode:both;animation-duration:.4s;opacity:0;pointer-events:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.customize-partial-edit-shortcut:focus:before,.customize-partial-edit-shortcut:hover:before{background:#008ec2;border-color:#191e23}body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut:before{animation-name:customize-partial-edit-shortcut-bounce-appear;pointer-events:auto}body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut:before{animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:before{animation-duration:1.5s;animation-delay:.4s;animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}.customize-partial-edit-shortcut-hidden:before,.page-sidebar-collapsed .customize-partial-edit-shortcut:before{visibility:hidden}.customize-partial-edit-shortcut-absolute,.widget button.customize-partial-edit-shortcut-absolute{position:static}.customize-partial-edit-shortcut-left-margin:before{left:0}@keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:scale3d(.3,.3,.3)}20%{transform:scale3d(1.1,1.1,1.1)}40%{transform:scale3d(.9,.9,.9)}60%{opacity:1;transform:scale3d(1.03,1.03,1.03)}80%{transform:scale3d(.97,.97,.97)}to{opacity:1;transform:scale3d(1,1,1)}}@keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:1;transform:scale3d(1,1,1)}20%{transform:scale3d(.97,.97,.97)}40%{opacity:1;transform:scale3d(1.03,1.03,1.03)}60%{transform:scale3d(.9,.9,.9)}80%{transform:scale3d(1.1,1.1,1.1)}to{opacity:0;transform:scale3d(.3,.3,.3)}}@media screen and (max-width:800px){.customize-partial-edit-shortcut:before{left:-18px}} \ No newline at end of file +.customize-partial-refreshing{opacity:.25;-webkit-transition:opacity .25s;transition:opacity .25s;cursor:progress}.customize-partial-refreshing.widget-customizer-highlighted-widget{-webkit-box-shadow:none;box-shadow:none}.customize-partial-edit-shortcut,.widget button.customize-partial-edit-shortcut{position:relative;float:left;width:1px;height:1px;padding:0;margin:-1px 0 0 -1px;border:0;background:0 0;color:transparent;box-shadow:none;outline:0;z-index:5}.customize-partial-edit-shortcut:active{padding:0;border:0}.customize-partial-edit-shortcut:before{position:absolute;left:-36px;color:#fff;width:30px;height:30px;font-size:18px;font-family:dashicons;content:'\f464';z-index:5;background-color:#0085ba;border-radius:50%;border:2px solid #fff;box-shadow:0 2px 1px rgba(46,68,83,.15);text-align:center;display:flex;flex-direction:row;justify-content:center;align-items:center;cursor:pointer;padding:0;animation-fill-mode:both;animation-duration:.4s;opacity:0;pointer-events:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.customize-partial-edit-shortcut:focus:before,.customize-partial-edit-shortcut:hover:before{background:#008ec2;border-color:#191e23}body.customize-partial-edit-shortcuts-shown .customize-partial-edit-shortcut:before{animation-name:customize-partial-edit-shortcut-bounce-appear;pointer-events:auto}body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut:before{animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:before{animation-duration:1.5s;animation-delay:.4s;animation-name:customize-partial-edit-shortcut-bounce-disappear;pointer-events:none}.customize-partial-edit-shortcut-hidden:before,.page-sidebar-collapsed .customize-partial-edit-shortcut:before{visibility:hidden}.customize-partial-edit-shortcut-left-margin:before{left:0}@keyframes customize-partial-edit-shortcut-bounce-appear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:scale3d(.3,.3,.3)}20%{transform:scale3d(1.1,1.1,1.1)}40%{transform:scale3d(.9,.9,.9)}60%{opacity:1;transform:scale3d(1.03,1.03,1.03)}80%{transform:scale3d(.97,.97,.97)}to{opacity:1;transform:scale3d(1,1,1)}}@keyframes customize-partial-edit-shortcut-bounce-disappear{20%,40%,60%,80%,from,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:1;transform:scale3d(1,1,1)}20%{transform:scale3d(.97,.97,.97)}40%{opacity:1;transform:scale3d(1.03,1.03,1.03)}60%{transform:scale3d(.9,.9,.9)}80%{transform:scale3d(1.1,1.1,1.1)}to{opacity:0;transform:scale3d(.3,.3,.3)}}@media screen and (max-width:800px){.customize-partial-edit-shortcut:before{left:-18px}} \ No newline at end of file diff --git a/wp-includes/js/customize-selective-refresh.js b/wp-includes/js/customize-selective-refresh.js index 953105775d..e6532136fe 100644 --- a/wp-includes/js/customize-selective-refresh.js +++ b/wp-includes/js/customize-selective-refresh.js @@ -141,62 +141,12 @@ wp.customize.selectiveRefresh = ( function( $, api ) { var partial = this, $placementContainer; $placementContainer = $( placement.container ); $placementContainer.prepend( $editShortcut ); - if ( 'absolute' === $placementContainer.css( 'position' ) ) { - $editShortcut.addClass( 'customize-partial-edit-shortcut-absolute' ); - $editShortcut.css( partial.getEditShortcutPositionStyles( $placementContainer ) ); - partial.whenPageChanges( function() { - $editShortcut.css( partial.getEditShortcutPositionStyles( $placementContainer ) ); - } ); - } if ( ! $placementContainer.is( ':visible' ) || 'none' === $placementContainer.css( 'display' ) ) { $editShortcut.addClass( 'customize-partial-edit-shortcut-hidden' ); } $editShortcut.toggleClass( 'customize-partial-edit-shortcut-left-margin', $editShortcut.offset().left < 1 ); }, - /** - * Call a callback function when the page changes. - * - * This calls a callback for any change that might require refreshing the edit shortcuts. - * - * @since 4.7 - * - * @param {Function} callback The function to call when the page changes. - * @returns {void} - */ - whenPageChanges: function( callback ) { - var debouncedCallback, $document; - debouncedCallback = _.debounce( function() { - // Timeout allows any page animations to finish - setTimeout( callback, 100 ); - }, 350 ); - // When window is resized. - $( window ).resize( debouncedCallback ); - // When any customizer setting changes. - api.bind( 'change', debouncedCallback ); - $document = $( window.document ); - // After scroll in case there are fixed position elements - $document.on( 'scroll', debouncedCallback ); - // After page click (eg: hamburger menus) - $document.on( 'click', debouncedCallback ); - }, - - /** - * Return the CSS positioning for the edit shortcut for a given partial placement. - * - * @since 4.7 - * - * @param {jQuery} $placementContainer The placement container element as a jQuery object. - * @return {Object} Object containing CSS positions. - */ - getEditShortcutPositionStyles: function( $placementContainer ) { - return { - top: $placementContainer.css( 'top' ), - left: $placementContainer.css( 'left' ), - right: 'auto' - }; - }, - /** * Return the unique class name for the edit shortcut button for this partial. * diff --git a/wp-includes/js/customize-selective-refresh.min.js b/wp-includes/js/customize-selective-refresh.min.js index 82c61ab9f5..2803d178a4 100644 --- a/wp-includes/js/customize-selective-refresh.min.js +++ b/wp-includes/js/customize-selective-refresh.min.js @@ -1 +1 @@ -wp.customize.selectiveRefresh=function(a,b){"use strict";var c,d,e;return c={ready:a.Deferred(),editShortcutVisibility:new b.Value,data:{partials:{},renderQueryVar:"",l10n:{shiftClickToEdit:""}},currentRequest:null},_.extend(c,b.Events),d=c.Partial=b.Class.extend({id:null,initialize:function(b,c){var d=this;c=c||{},d.id=b,d.params=_.extend({selector:null,settings:[],primarySetting:null,containerInclusive:!1,fallbackRefresh:!0},c.params||{}),d.deferred={},d.deferred.ready=a.Deferred(),d.deferred.ready.done(function(){d.ready()})},ready:function(){var b=this;_.each(b.placements(),function(d){a(d.container).attr("title",c.data.l10n.shiftClickToEdit),b.createEditShortcutForPlacement(d)}),a(document).on("click",b.params.selector,function(c){c.shiftKey&&(c.preventDefault(),_.each(b.placements(),function(d){a(d.container).is(c.currentTarget)&&b.showControl()}))})},createEditShortcutForPlacement:function(b){var c,d,e=this;b.container&&(d=a(b.container),d.length&&(c=e.createEditShortcut(),e.positionEditShortcut(b,c),c.on("click",function(a){a.preventDefault(),a.stopPropagation(),e.showControl()})))},positionEditShortcut:function(b,c){var d,e=this;d=a(b.container),d.prepend(c),"absolute"===d.css("position")&&(c.addClass("customize-partial-edit-shortcut-absolute"),c.css(e.getEditShortcutPositionStyles(d)),e.whenPageChanges(function(){c.css(e.getEditShortcutPositionStyles(d))})),d.is(":visible")&&"none"!==d.css("display")||c.addClass("customize-partial-edit-shortcut-hidden"),c.toggleClass("customize-partial-edit-shortcut-left-margin",c.offset().left<1)},whenPageChanges:function(c){var d,e;d=_.debounce(function(){setTimeout(c,100)},350),a(window).resize(d),b.bind("change",d),e=a(window.document),e.on("scroll",d),e.on("click",d)},getEditShortcutPositionStyles:function(a){return{top:a.css("top"),left:a.css("left"),right:"auto"}},getEditShortcutClassName:function(){var a,b=this;return a=b.id.replace(/]/g,"").replace(/\[/g,"-"),"customize-partial-edit-shortcut-"+a},getEditShortcutTitle:function(){var a=this,b=c.data.l10n;switch(a.getType()){case"widget":return b.clickEditWidget;case"blogname":return b.clickEditTitle;case"blogdescription":return b.clickEditTitle;case"nav_menu":return b.clickEditMenu;default:return b.clickEditMisc}},getType:function(){var a,b=this;return a=b.params.primarySetting||_.first(b.settings())||"unknown",b.params.type?b.params.type:a.match(/^nav_menu_instance\[/)?"nav_menu":a.match(/^widget_.+\[\d+]$/)?"widget":a},createEditShortcut:function(){var b,c=this;return b=c.getEditShortcutTitle(),a("'),e.text(d),e.on("click",function(){b.selectiveRefresh.editShortcutVisibility.set("visible"===b.selectiveRefresh.editShortcutVisibility.get()?"hidden":"visible")}),f.prepend(e)),c.partial.each(function(a){a.deferred.ready.resolve()}),c.partial.bind("add",function(a){a.deferred.ready.resolve()}),f.on("click",function(c){a(c.target).is(".customize-partial-edit-shortcut, :input, a[href]")||0!==a(c.target).closest("a").length||(b.selectiveRefresh.editShortcutVisibility.set("visible"===b.selectiveRefresh.editShortcutVisibility.get()?"hidden":"visible"),b.preview.send("edit-shortcut-visibility",b.selectiveRefresh.editShortcutVisibility.get()))})})}),c}(jQuery,wp.customize); \ No newline at end of file +wp.customize.selectiveRefresh=function(a,b){"use strict";var c,d,e;return c={ready:a.Deferred(),editShortcutVisibility:new b.Value,data:{partials:{},renderQueryVar:"",l10n:{shiftClickToEdit:""}},currentRequest:null},_.extend(c,b.Events),d=c.Partial=b.Class.extend({id:null,initialize:function(b,c){var d=this;c=c||{},d.id=b,d.params=_.extend({selector:null,settings:[],primarySetting:null,containerInclusive:!1,fallbackRefresh:!0},c.params||{}),d.deferred={},d.deferred.ready=a.Deferred(),d.deferred.ready.done(function(){d.ready()})},ready:function(){var b=this;_.each(b.placements(),function(d){a(d.container).attr("title",c.data.l10n.shiftClickToEdit),b.createEditShortcutForPlacement(d)}),a(document).on("click",b.params.selector,function(c){c.shiftKey&&(c.preventDefault(),_.each(b.placements(),function(d){a(d.container).is(c.currentTarget)&&b.showControl()}))})},createEditShortcutForPlacement:function(b){var c,d,e=this;b.container&&(d=a(b.container),d.length&&(c=e.createEditShortcut(),e.positionEditShortcut(b,c),c.on("click",function(a){a.preventDefault(),a.stopPropagation(),e.showControl()})))},positionEditShortcut:function(b,c){var d;d=a(b.container),d.prepend(c),d.is(":visible")&&"none"!==d.css("display")||c.addClass("customize-partial-edit-shortcut-hidden"),c.toggleClass("customize-partial-edit-shortcut-left-margin",c.offset().left<1)},getEditShortcutClassName:function(){var a,b=this;return a=b.id.replace(/]/g,"").replace(/\[/g,"-"),"customize-partial-edit-shortcut-"+a},getEditShortcutTitle:function(){var a=this,b=c.data.l10n;switch(a.getType()){case"widget":return b.clickEditWidget;case"blogname":return b.clickEditTitle;case"blogdescription":return b.clickEditTitle;case"nav_menu":return b.clickEditMenu;default:return b.clickEditMisc}},getType:function(){var a,b=this;return a=b.params.primarySetting||_.first(b.settings())||"unknown",b.params.type?b.params.type:a.match(/^nav_menu_instance\[/)?"nav_menu":a.match(/^widget_.+\[\d+]$/)?"widget":a},createEditShortcut:function(){var b,c=this;return b=c.getEditShortcutTitle(),a("'),e.text(d),e.on("click",function(){b.selectiveRefresh.editShortcutVisibility.set("visible"===b.selectiveRefresh.editShortcutVisibility.get()?"hidden":"visible")}),f.prepend(e)),c.partial.each(function(a){a.deferred.ready.resolve()}),c.partial.bind("add",function(a){a.deferred.ready.resolve()}),f.on("click",function(c){a(c.target).is(".customize-partial-edit-shortcut, :input, a[href]")||0!==a(c.target).closest("a").length||(b.selectiveRefresh.editShortcutVisibility.set("visible"===b.selectiveRefresh.editShortcutVisibility.get()?"hidden":"visible"),b.preview.send("edit-shortcut-visibility",b.selectiveRefresh.editShortcutVisibility.get()))})})}),c}(jQuery,wp.customize); \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index 7688fcd6a1..daca2d47cc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38971'; +$wp_version = '4.7-alpha-38972'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.