File Editor
Directories:
.. (Back)
widgets
Files:
accordion.js
accordion.min.js
code-editor.js
code-editor.min.js
color-picker.js
color-picker.min.js
comment.js
comment.min.js
common.js
common.min.js
custom-background.js
custom-background.min.js
custom-header.js
customize-controls.js
customize-controls.min.js
customize-nav-menus.js
customize-nav-menus.min.js
customize-widgets.js
customize-widgets.min.js
dashboard.js
dashboard.min.js
edit-comments.js
edit-comments.min.js
editor-expand.js
editor-expand.min.js
editor.js
editor.min.js
farbtastic.js
gallery.js
gallery.min.js
image-edit.js
image-edit.min.js
inline-edit-post.js
inline-edit-post.min.js
inline-edit-tax.js
inline-edit-tax.min.js
iris.min.js
language-chooser.js
language-chooser.min.js
link.js
link.min.js
media-gallery.js
media-gallery.min.js
media-upload.js
media-upload.min.js
media.js
media.min.js
nav-menu.js
nav-menu.min.js
password-strength-meter.js
password-strength-meter.min.js
plugin-install.js
plugin-install.min.js
post.js
post.min.js
postbox.js
postbox.min.js
privacy-tools.js
privacy-tools.min.js
revisions.js
revisions.min.js
set-post-thumbnail.js
set-post-thumbnail.min.js
site-health.js
site-health.min.js
svg-painter.js
svg-painter.min.js
tags-box.js
tags-box.min.js
tags-suggest.js
tags-suggest.min.js
tags.js
tags.min.js
theme-plugin-editor.js
theme-plugin-editor.min.js
theme.js
theme.min.js
updates.js
updates.min.js
user-profile.js
user-profile.min.js
user-suggest.js
user-suggest.min.js
widgets.js
widgets.min.js
word-count.js
word-count.min.js
wp-fullscreen-stub.js
wp-fullscreen-stub.min.js
xfn.js
xfn.min.js
Create New File
Create
Edit File: dashboard.min.js
window.wp=window.wp||{},jQuery(document).ready(function(s){var t,n=s("#welcome-panel"),e=s("#wp_welcome_panel-hide");t=function(e){s.post(ajaxurl,{action:"update-welcome-panel",visible:e,welcomepanelnonce:s("#welcomepanelnonce").val()})},n.hasClass("hidden")&&e.prop("checked")&&n.removeClass("hidden"),s(".welcome-panel-close, .welcome-panel-dismiss a",n).click(function(e){e.preventDefault(),n.addClass("hidden"),t(0),s("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){n.toggleClass("hidden",!this.checked),t(this.checked?1:0)}),window.ajaxWidgets=["dashboard_primary"],window.ajaxPopulateWidgets=function(e){function t(e,t){var n,o=s("#"+t+" div.inside:visible").find(".widget-loading");o.length&&(n=o.parent(),setTimeout(function(){n.load(ajaxurl+"?action=dashboard-widgets&widget="+t+"&pagenow="+pagenow,"",function(){n.hide().slideDown("normal",function(){s(this).css("display","")})})},500*e))}e?(e=e.toString(),-1!==s.inArray(e,ajaxWidgets)&&t(0,e)):s.each(ajaxWidgets,t)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),window.quickPressLoad=function(){var t,n,o,i,a,e=s("#quickpost-action");s('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),t=s("#quick-press").submit(function(e){e.preventDefault(),s("#dashboard_quick_press #publishing-action .spinner").show(),s('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),s.post(t.attr("action"),t.serializeArray(),function(e){var t;s("#dashboard_quick_press .inside").html(e),s("#quick-press").removeClass("initial-form"),quickPressLoad(),(t=s(".drafts ul li").first()).css("background","#fffbe5"),setTimeout(function(){t.css("background","none")},1e3),s("#title").focus()})}),s("#publish").click(function(){e.val("post-quickpress-publish")}),s("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),document.documentMode&&document.documentMode<9||(s("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>'),n=s(".quick-draft-textarea-clone"),o=s("#content"),i=o.height(),a=s(window).height()-100,n.css({"font-family":o.css("font-family"),"font-size":o.css("font-size"),"line-height":o.css("line-height"),"padding-bottom":o.css("paddingBottom"),"padding-left":o.css("paddingLeft"),"padding-right":o.css("paddingRight"),"padding-top":o.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),o.on("focus input propertychange",function(){var e=s(this),t=e.val()+" ",t=n.css("width",e.css("width")).text(t).outerHeight()+2;o.css("overflow-y","auto"),t===i||a<=t&&a<=i||(i=a<t?a:t,o.css("overflow","hidden"),e.css("height",i+"px"))}))},window.quickPressLoad(),s(".meta-box-sortables").sortable("option","containment","#wpwrap")}),jQuery(function(r){"use strict";var l=window.communityEventsData||{},d=window.wp.communityEvents={initialized:!1,model:null,init:function(){var e;d.initialized||(e=r("#community-events"),r(".community-events-errors").attr("aria-hidden","true").removeClass("hide-if-js"),e.on("click",".community-events-toggle-location, .community-events-cancel",d.toggleLocationForm),e.on("submit",".community-events-form",function(e){var t=r.trim(r("#community-events-location").val());e.preventDefault(),t&&d.getEvents({location:t})}),l&&l.cache&&l.cache.location&&l.cache.events?d.renderEventsTemplate(l.cache,"app"):d.getEvents(),d.initialized=!0)},toggleLocationForm:function(e){var t=r(".community-events-toggle-location"),n=r(".community-events-cancel"),o=r(".community-events-form"),i=r();"object"==typeof e&&(i=r(e.target),e="true"==t.attr("aria-expanded")?"hide":"show"),"hide"===e?(t.attr("aria-expanded","false"),n.attr("aria-expanded","false"),o.attr("aria-hidden","true"),i.hasClass("community-events-cancel")&&t.focus()):(t.attr("aria-expanded","true"),n.attr("aria-expanded","true"),o.attr("aria-hidden","false"))},getEvents:function(t){var n,o=this,e=r(".community-events-form").children(".spinner");(t=t||{})._wpnonce=l.nonce,t.timezone=window.Intl?window.Intl.DateTimeFormat().resolvedOptions().timeZone:"",n=t.location?"user":"app",e.addClass("is-active"),wp.ajax.post("get-community-events",t).always(function(){e.removeClass("is-active")}).done(function(e){"no_location_available"===e.error&&(t.location?e.unknownCity=t.location:delete e.error),o.renderEventsTemplate(e,n)}).fail(function(){o.renderEventsTemplate({location:!1,error:!0},n)})},renderEventsTemplate:function(e,t){var n,o=/%(?:\d\$)?s/g,i=r(".community-events-toggle-location"),a=r("#community-events-location-message"),s=r(".community-events-results"),c={".community-events":!0,".community-events-loading":!1,".community-events-errors":!1,".community-events-error-occurred":!1,".community-events-could-not-locate":!1,"#community-events-location-message":!1,".community-events-toggle-location":!1,".community-events-results":!1};e.location.ip?(a.text(l.l10n.attend_event_near_generic),n=e.events.length?wp.template("community-events-event-list"):wp.template("community-events-no-upcoming-events"),s.html(n(e)),c["#community-events-location-message"]=!0,c[".community-events-toggle-location"]=!0,c[".community-events-results"]=!0):e.location.description?(n=wp.template("community-events-attend-event-near"),a.html(n(e)),n=e.events.length?wp.template("community-events-event-list"):wp.template("community-events-no-upcoming-events"),s.html(n(e)),"user"===t&&wp.a11y.speak(l.l10n.city_updated.replace(o,e.location.description),"assertive"),c["#community-events-location-message"]=!0,c[".community-events-toggle-location"]=!0,c[".community-events-results"]=!0):e.unknownCity?(n=wp.template("community-events-could-not-locate"),r(".community-events-could-not-locate").html(n(e)),wp.a11y.speak(l.l10n.could_not_locate_city.replace(o,e.unknownCity)),c[".community-events-errors"]=!0,c[".community-events-could-not-locate"]=!0):e.error&&"user"===t?(wp.a11y.speak(l.l10n.error_occurred_please_try_again),c[".community-events-errors"]=!0,c[".community-events-error-occurred"]=!0):(a.text(l.l10n.enter_closest_city),c["#community-events-location-message"]=!0,c[".community-events-toggle-location"]=!0),_.each(c,function(e,t){r(t).attr("aria-hidden",!e)}),i.attr("aria-expanded",c[".community-events-toggle-location"]),e.location&&(e.location.ip||e.location.latitude)?(d.toggleLocationForm("hide"),"user"===t&&i.focus()):d.toggleLocationForm("show")}};r("#dashboard_primary").is(":visible")?d.init():r(document).on("postbox-toggled",function(e,t){t=r(t);"dashboard_primary"===t.attr("id")&&t.is(":visible")&&d.init()})});
Save Changes
Rename File
Rename